edu.iu.pcl.absurdist.common
Class CSGI

java.lang.Object
  |
  +--edu.iu.pcl.absurdist.common.CSGI

public class CSGI
extends java.lang.Object

Concept System Graph Interface (CSGI) allows us to access the information about a ConceptSystem as if it were a standard graph. The main advantage of using this interface consists in enabling us to directly access the "neighbor list" for each node, without having to query the hash table for each possible pair. This is analogous to using a sparse-matrix representation as compared to a dense matrix.


Constructor Summary
CSGI(ConceptSystem s)
          Creates a CSGI representation for a ConceptSystem
 
Method Summary
 int degree(int j)
          The degree of node j
 int getMaxDgrConceptIdx()
          The index of the node that has the largest degree.
 int getMinDgrConceptIdx()
          The index of the node that has the lowest degree.
 int[] getNei(int j)
          Returns the sorted list of nodes connected to the node j
 int[] getNeiPlus(int j)
          Returns the sorted list of nodes connected to the node j, plus j itself
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSGI

public CSGI(ConceptSystem s)
     throws java.lang.IllegalArgumentException
Creates a CSGI representation for a ConceptSystem

Method Detail

getNei

public int[] getNei(int j)
Returns the sorted list of nodes connected to the node j


getNeiPlus

public int[] getNeiPlus(int j)
Returns the sorted list of nodes connected to the node j, plus j itself


degree

public int degree(int j)
The degree of node j


getMaxDgrConceptIdx

public int getMaxDgrConceptIdx()
The index of the node that has the largest degree. (If several nodes have this degree, the first one will be returned).


getMinDgrConceptIdx

public int getMinDgrConceptIdx()
The index of the node that has the lowest degree. (If several nodes have this degree, the first one will be returned).