|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetkit.graph.edgecreator.EdgeCreatorImp
netkit.graph.edgecreator.BaseCategoricalEdgeCreator
public class BaseCategoricalEdgeCreator
Nested Class Summary |
---|
Nested classes/interfaces inherited from class netkit.graph.edgecreator.EdgeCreatorImp |
---|
EdgeCreatorImp.NbrEntry |
Field Summary |
---|
Fields inherited from class netkit.graph.edgecreator.EdgeCreatorImp |
---|
attrib, attributeIndex, attributeValue, edges, edgetype, gm, graph, logger, maxEdges, nodeType, split, trainAssortativity, trueAssortativity |
Constructor Summary | |
---|---|
BaseCategoricalEdgeCreator()
|
Method Summary | |
---|---|
protected void |
buildEdges()
build the edges using the current edge creation model. |
boolean |
canHandle(Attribute attribute)
Queries the edge creator if it can handle (i.e., create edges for) the given attribute. |
boolean |
canHandleAttributeValue(Attribute attribute)
Queries the edge creator if it can handle (i.e., create edges for) the given attribute using a specific attribute value. |
double[][] |
getAssortativityMatrix(boolean useTrueAssort)
|
Edge[] |
getEdgesToNearestNeighbors(Node node)
Get the edges to the K nearest nodes (highest weight using this edge creator), where max-k was provided during initialization. |
java.lang.String |
getName()
The name of this edge-creator |
double |
getWeight(Node src,
Node dest)
Calculate the edgeweight from node src to node dest. |
void |
initialize(Graph graph,
java.lang.String nodeType,
int attributeIndex,
double attributeValue,
int maxEdges)
Initialize this creator. |
boolean |
isByAttributeValue()
Is this edge creator by attribute value or by attribute as a whole |
Methods inherited from class netkit.graph.edgecreator.EdgeCreatorImp |
---|
addCliqueToAssortMatrix, buildModel, createEdges, getAssortativity, getAttributeIndex, getAttributeValue, getEdgeType, getLabeledNodes, getMaxEdges, isByAttribute |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseCategoricalEdgeCreator()
Method Detail |
---|
public void initialize(Graph graph, java.lang.String nodeType, int attributeIndex, double attributeValue, int maxEdges)
EdgeCreator
initialize
in interface EdgeCreator
initialize
in class EdgeCreatorImp
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 nodepublic java.lang.String getName()
EdgeCreator
public double getWeight(Node src, Node dest)
EdgeCreator
initialize
has already been called, so that the creator
knows the graph, the class attribute index and the attribute index
src
- The source nodedest
- The destination node
public boolean canHandle(Attribute attribute)
EdgeCreator
public boolean canHandleAttributeValue(Attribute attribute)
EdgeCreator
canHandleAttributeValue
in interface EdgeCreator
canHandleAttributeValue
in class EdgeCreatorImp
public boolean isByAttributeValue()
EdgeCreator
isByAttributeValue
in interface EdgeCreator
isByAttributeValue
in class EdgeCreatorImp
public Edge[] getEdgesToNearestNeighbors(Node node)
EdgeCreatorImp
getEdgesToNearestNeighbors
in class EdgeCreatorImp
node
- The node
public double[][] getAssortativityMatrix(boolean useTrueAssort)
getAssortativityMatrix
in class EdgeCreatorImp
protected void buildEdges()
EdgeCreatorImp
buildEdges
in class EdgeCreatorImp
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |