Syntax:
degree_weight dupflag -i in1 -o out1.file out1.mr
Examples:
degree 1 -i mrv -o degree.list NULL
Description:
This is a named command which calculates the degree of each vertex in a graph.
If the dupflag is 2, then each edge increments the degree of both of its vertices. If the dupflag is 1, then each edge only increments the degree of the first of its vertices. The former is usually more approrpriate for undirected graphs; the latter for directed graphs, in which case the out-degree of each vertex is being calculated.
See the named command doc page for various ways in which the -i inputs and -o outputs for a named command can be specified.
In1 stores a set of edges. No assumption is made about duplicates or self edges, i.e. (Vi,Vj) may appear multiple times, both (Vi,Vj) or (Vj,Vi) may appear, as may (Vi,Vi). The input is unchanged by this command.
Out1 will store the degree count of each vertex.
Related commands: