netkit.graph.edgecreator
Class NormalizedNumericEdgeCreator
java.lang.Object
netkit.graph.edgecreator.EdgeCreatorImp
netkit.graph.edgecreator.BaseNumericEdgeCreator
netkit.graph.edgecreator.NormalizedNumericEdgeCreator
- All Implemented Interfaces:
- EdgeCreator
public class NormalizedNumericEdgeCreator
- extends BaseNumericEdgeCreator
Fields inherited from class netkit.graph.edgecreator.EdgeCreatorImp |
attrib, attributeIndex, attributeValue, edges, edgetype, gm, graph, logger, maxEdges, nodeType, split, trainAssortativity, trueAssortativity |
Method Summary |
java.lang.String |
getName()
The name of this edge-creator |
protected double |
getValue(Node n)
|
double |
getWeight(Node src,
Node dest)
Calculate the edgeweight from node src to node dest. |
protected double |
getWeightFast(Node src,
Node dest)
|
void |
initialize(Graph graph,
java.lang.String nodeType,
int attributeIndex,
double attributeValue,
int maxEdges)
Initialize this creator. |
Methods inherited from class netkit.graph.edgecreator.EdgeCreatorImp |
addCliqueToAssortMatrix, buildModel, canHandleAttributeValue, createEdges, getAssortativity, getAssortativityMatrix, getAttributeIndex, getAttributeValue, getEdgeType, getLabeledNodes, getMaxEdges, isByAttribute, isByAttributeValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NormalizedNumericEdgeCreator
public NormalizedNumericEdgeCreator()
initialize
public void initialize(Graph graph,
java.lang.String nodeType,
int attributeIndex,
double attributeValue,
int maxEdges)
- Description copied from interface:
EdgeCreator
- Initialize this creator. This can only be done once
- Specified by:
initialize
in interface EdgeCreator
- Overrides:
initialize
in class EdgeCreatorImp
- Parameters:
graph
- The graph over which to create edgesnodeType
- Which nodetype is the node to create edges overattributeIndex
- The attribute index over which to generate edges (ignored for creators that cannot handle attributes)attributeValue
- The attribute value over which to generate edges (ignored for creators that cannot handle values; otherwise ignored if value is Double.NaN)maxEdges
- The maximum number of outgoing edges to create from any given node
getName
public java.lang.String getName()
- Description copied from interface:
EdgeCreator
- The name of this edge-creator
- Specified by:
getName
in interface EdgeCreator
- Overrides:
getName
in class BaseNumericEdgeCreator
getValue
protected double getValue(Node n)
- Overrides:
getValue
in class BaseNumericEdgeCreator
getWeightFast
protected double getWeightFast(Node src,
Node dest)
- Overrides:
getWeightFast
in class BaseNumericEdgeCreator
getWeight
public double getWeight(Node src,
Node dest)
- Description copied from interface:
EdgeCreator
- Calculate the edgeweight from node src to node dest. Assumes that
initialize
has already been called, so that the creator
knows the graph, the class attribute index and the attribute index
- Specified by:
getWeight
in interface EdgeCreator
- Overrides:
getWeight
in class BaseNumericEdgeCreator
- Parameters:
src
- The source nodedest
- The destination node
- Returns:
- the weight of the edge, Double.NaN if no edge should be created.