|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectGraphs
public class Graphs
A set of static routines for Graphs and DirectedGraphs.
Method Summary | |
---|---|
static void |
collapse(Graph g,
Object keepNode,
Object otherNode)
|
static IntDirectedGraph |
createIntDirectedGraph(DirectedGraph g,
Reference nodeMap)
|
static IntGraph |
createIntGraph(Graph g,
Reference nodeMap)
|
static DirectedGraph |
directAway(Graph g,
Object node)
This method assumes the graph is connected. |
static int |
edgeCount(Graph g)
Returns the number of edges in g. |
static Set |
family(DirectedGraph g,
Object vertex)
Returns the family of vertex. |
static boolean |
isConnected(Graph g)
Returns true if the graph is connected. |
static boolean |
isTree(Graph g)
|
static void |
makeClique(Graph g,
Set s)
|
static Graph |
moralGraph(DirectedGraph dg)
Returns the moral graph of dg. |
static Graph |
moralGraph(DirectedGraph dg,
Collection variables,
PrintStream streamDebug)
|
static void |
print(DirectedGraph g,
PrintStream stream)
|
static void |
print(Graph g,
PrintStream stream)
|
static DirectedGraph |
randomDAG(Object[] nodes,
double prob)
Generates a Dag, where there is an edge from (nodes[i],nodes[j]) with probability prob, where i |
static Graph |
randomGraph(Object[] nodes,
double prob)
Generates a graph generated by adding edge {nodes[i],nodes[j]) with probability prob. |
static void |
removeAndConnect(Graph g,
Object n)
Removes node n and connects all of its neighbors. |
static Set |
sinks(DirectedGraph dag)
|
static Set |
sources(DirectedGraph dag)
|
static String |
toString(DirectedGraph g)
|
static Graph |
undirect(DirectedGraph dg)
|
static double |
weightedwidth(DirectedGraph g,
List order)
Returns the weighted width of the graph using the elimination order specified (as specified in Darwiche & Hopkins 2001). |
static double |
weightedwidth(Graph g,
List order)
Returns the weighted width of the graph using the elimination order specified (as specified in Darwiche & Hopkins 2001). |
static int |
width(DirectedGraph g,
List order)
Returns the width of the graph using the elimination order specified. |
static double |
width(DirectedGraph g,
List order,
DoubleFunction weight)
|
static int |
width(Graph g,
List order)
Returns the width of the graph using the elimination order specified. |
static double |
width(Graph g,
List order,
DoubleFunction weight)
|
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Graph moralGraph(DirectedGraph dg)
public static Graph moralGraph(DirectedGraph dg, Collection variables, PrintStream streamDebug)
public static int width(DirectedGraph g, List order)
public static int width(Graph g, List order)
public static double weightedwidth(DirectedGraph g, List order)
public static double weightedwidth(Graph g, List order)
public static double width(DirectedGraph g, List order, DoubleFunction weight)
public static double width(Graph g, List order, DoubleFunction weight)
public static void removeAndConnect(Graph g, Object n)
public static void makeClique(Graph g, Set s)
public static void print(Graph g, PrintStream stream)
public static int edgeCount(Graph g)
public static Set family(DirectedGraph g, Object vertex)
public static void print(DirectedGraph g, PrintStream stream)
public static String toString(DirectedGraph g)
public static boolean isConnected(Graph g)
public static boolean isTree(Graph g)
public static DirectedGraph randomDAG(Object[] nodes, double prob)
public static Graph randomGraph(Object[] nodes, double prob)
public static DirectedGraph directAway(Graph g, Object node)
public static Graph undirect(DirectedGraph dg)
public static void collapse(Graph g, Object keepNode, Object otherNode)
public static IntGraph createIntGraph(Graph g, Reference nodeMap)
public static IntDirectedGraph createIntDirectedGraph(DirectedGraph g, Reference nodeMap)
public static Set sources(DirectedGraph dag)
public static Set sinks(DirectedGraph dag)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |