public class DegreeDistribution
extends java.lang.Object
Constructor and Description |
---|
DegreeDistribution() |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Integer neighbourCount) |
DegreeDistribution |
addDistribution(DegreeDistribution dd)
Adds a distribution to another distribution.
|
java.util.HashMap<java.lang.Integer,java.lang.Integer> |
getDistribution() |
double |
getSlope(int from,
int to) |
int |
getSumDegrees() |
void |
printDegreeDistribution() |
DegreeDistribution |
readFlatFile(java.io.File file)
Reads a distribution file as a flat file. format: Integer white space(s)
Integer.
|
void |
setDistribution(java.util.HashMap<java.lang.Integer,java.lang.Integer> distribution) |
void |
setVerticesCount(int _verticesCount) |
void |
writeAbsoluteDegreeDistributionToGnuPlot(java.lang.String path,
java.lang.String tmp)
Writes the absolute degree distribution to a file given by the parameter
path.
|
void |
writeRelativeDegreeDistributionToGnuPlot(java.lang.String path,
java.lang.String tmp)
Writes the relative degree distribution to a file given by the parameter
path.
|
public void add(java.lang.Integer neighbourCount)
public DegreeDistribution addDistribution(DegreeDistribution dd)
public void writeAbsoluteDegreeDistributionToGnuPlot(java.lang.String path, java.lang.String tmp)
path
- -
path of the file the distribution will be written totmp
- -
additional information to be written to the filepublic void writeRelativeDegreeDistributionToGnuPlot(java.lang.String path, java.lang.String tmp)
path
- -
path of the file the distribution will be written totmp
- -
additional information to be written to the filepublic double getSlope(int from, int to)
public int getSumDegrees()
public void printDegreeDistribution()
public java.util.HashMap<java.lang.Integer,java.lang.Integer> getDistribution()
public void setDistribution(java.util.HashMap<java.lang.Integer,java.lang.Integer> distribution)
public DegreeDistribution readFlatFile(java.io.File file)
file
- public void setVerticesCount(int _verticesCount)