netkit.graph.edgecreator
Class NormalizedNumericEdgeCreator

java.lang.Object
  extended by netkit.graph.edgecreator.EdgeCreatorImp
      extended by netkit.graph.edgecreator.BaseNumericEdgeCreator
          extended by netkit.graph.edgecreator.NormalizedNumericEdgeCreator
All Implemented Interfaces:
EdgeCreator

public class NormalizedNumericEdgeCreator
extends BaseNumericEdgeCreator


Nested Class Summary
 
Nested classes/interfaces inherited from class netkit.graph.edgecreator.EdgeCreatorImp
EdgeCreatorImp.NbrEntry
 
Field Summary
 
Fields inherited from class netkit.graph.edgecreator.BaseNumericEdgeCreator
nat, nodes
 
Fields inherited from class netkit.graph.edgecreator.EdgeCreatorImp
attrib, attributeIndex, attributeValue, edges, edgetype, gm, graph, logger, maxEdges, nodeType, split, trainAssortativity, trueAssortativity
 
Constructor Summary
NormalizedNumericEdgeCreator()
           
 
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.BaseNumericEdgeCreator
buildEdges, buildNodeArray, canHandle, getEdgesToNearestNeighbors
 
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
 

Constructor Detail

NormalizedNumericEdgeCreator

public NormalizedNumericEdgeCreator()
Method Detail

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 edges
nodeType - Which nodetype is the node to create edges over
attributeIndex - 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 node
dest - The destination node
Returns:
the weight of the edge, Double.NaN if no edge should be created.