netkit.graph
Class AttributeCategoricalMetaInfo

java.lang.Object
  extended by netkit.graph.AbstractAttributeMetaInfo
      extended by netkit.graph.AttributeCategoricalMetaInfo

public class AttributeCategoricalMetaInfo
extends AbstractAttributeMetaInfo

This class is used to persist certain information across an entire graph related to a particular AttributeCategorical.

Author:
Kaveh R. Ghazi
See Also:
AttributeCategorical, Graph, Node

Field Summary
 
Fields inherited from class netkit.graph.AbstractAttributeMetaInfo
graph
 
Constructor Summary
AttributeCategoricalMetaInfo(AttributeCategorical attrib, Attributes attributes, Graph graph)
          Construct an object of this type.
 
Method Summary
 HistogramCategorical getClassReferenceVector(AttributeCategorical sourceAttrib, int sourceAttribValue, java.util.List<EdgeType> path, boolean normalized)
          Get the class reference vector from the graph for this attribute.
 int getMode()
          Get the mode value this Graph has for this field.
 HistogramCategorical getUnconditionalReferenceVector(java.util.List<EdgeType> path, boolean normalized)
          Get the unconditional reference vector from the graph for this attribute.
 
Methods inherited from class netkit.graph.AbstractAttributeMetaInfo
getFieldName, getMax, getMean, getMedian, getMin, getNodeTypeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeCategoricalMetaInfo

public AttributeCategoricalMetaInfo(AttributeCategorical attrib,
                                    Attributes attributes,
                                    Graph graph)
Construct an object of this type.

Parameters:
attrib - the AttributeCategorical for this meta info object.
attributes - the Attributes container that attrib lives in.
graph - the Graph object that the attributes lives in.
Method Detail

getClassReferenceVector

public HistogramCategorical getClassReferenceVector(AttributeCategorical sourceAttrib,
                                                    int sourceAttribValue,
                                                    java.util.List<EdgeType> path,
                                                    boolean normalized)
Get the class reference vector from the graph for this attribute.

Parameters:
sourceAttrib - the source attribute for the vector.
sourceAttribValue - the value the source attribute must have.
path - the list of EdgeTypes to follow in the path when creating the vector.
normalized - if true, the results will be normalized.
Returns:
a HistogramCategorical containing the reference vector.

getUnconditionalReferenceVector

public HistogramCategorical getUnconditionalReferenceVector(java.util.List<EdgeType> path,
                                                            boolean normalized)
Get the unconditional reference vector from the graph for this attribute.

Parameters:
path - the list of EdgeTypes to follow in the path when creating the vector.
normalized - if true, the results will be normalized.
Returns:
a HistogramCategorical containing the reference vector.

getMode

public int getMode()
Get the mode value this Graph has for this field.

Returns:
the mode value this Graph has for this field.