

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object com.hp.hpl.guess.layout.NetUtilities
Performs various common operations on passed networks and returns them, and/or returns a statistic on a passed network and returns the result. Please note that these may be fairly "naive" algorithm implementations, and no guarantees are made about the accuracy of the statistics. The intention is that these may be used for "on the fly" qualitative evaluation of a model, but real network statistics should be done with more serious software such as UCINET or Pajek.
ALL THE METHODS CAN BE CONSIDERED BETA AND SHOULD ONLY BE USED FOR "ON THE FLY" CALCULATIONS. ACTUAL NETWORK STATISTICS SHOULD BE DONE WITH DEDICATED NETWORK ANALYSIS SOFTWARE, SUCH AS PAJEK OR UCINET.
Constructor Summary  
NetUtilities()
NoArgument constructor for convenience / aliasing. 
Method Summary  
static double 
calcDensity(Set nodes)
calculates density (ratio of arcs in network to maximum possible number of arcs) of passed network. 
static double 
calcDensity(Set nodes,
boolean collapseMulti)
Calculates density of the network, but if collapseMulti is true, it first collapses any multiplex ties. 
static cern.colt.matrix.impl.DenseDoubleMatrix2D 
getAllShortPathMatrix(Set nodes)

static Set 
getComponents(Set nodes)
Returns an ArrayList of length equal to the number of components in the graph, each entry of which is an ArrayList of the nodes in that component. 
static int 
getInDegree(Node iNode)
Returns the in degree (number of in edges) of the node. 
static int 
getNumDirectTriads(Node iNode,
Node jNode)
Finds and returns the number of "parents" (nodes with links TO both i and j) 
static int 
getOutDegree(Node iNode)
Returns the out degree (number of out edges) of the node. 
static boolean 
hasSelfLoops(Set nodes)
Returns a boolean indicating whether the network contains selfloops (links from i > i) 
static boolean 
isMultiplexNet(Set nodes)
Checks if there are any nodes i j for which there is more than one tie i > j (almost all network statistics assume that the network is NOT multiplex) 
Methods inherited from class java.lang.Object 
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 
public NetUtilities()
Method Detail 
public static double calcDensity(Set nodes)
public static double calcDensity(Set nodes, boolean collapseMulti)
nodes
 the ArrayList of nodes to examinepublic static boolean isMultiplexNet(Set nodes)
public static boolean hasSelfLoops(Set nodes)
nodes
 the ArrayList of nodes to examine for loopspublic static int getOutDegree(Node iNode)
iNode
 the node the degree will be returned forpublic static int getInDegree(Node iNode)
iNode
 the node the degree will be returned forpublic static int getNumDirectTriads(Node iNode, Node jNode)
iNode
 one node of triadjNode
 the second node of the triadpublic static Set getComponents(Set nodes)
nodes
 the network in which components will be countedpublic static cern.colt.matrix.impl.DenseDoubleMatrix2D getAllShortPathMatrix(Set nodes)


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 