il2.inf.edgedeletion
Class EDEdgeDeleter

Object
  extended by EDEdgeDeleter

public class EDEdgeDeleter
extends Object


Constructor Summary
EDEdgeDeleter()
           
 
Method Summary
static int[][] complementEdgeList(BayesianNetwork bn, int[][] inputEdges)
          Returns all BN edges not given in inputEdges
static int[][] complementEdgeList(Table[] tables, int[][] inputEdges)
          Returns all factor graph edges not given in inputEdges
static String edgeToString(int[] edge)
           
static int[][] getAllEdges(BayesianNetwork bn)
          returns an int[numEdges][2] of all edges.
static int[][] getAllEdges(Table[] tables)
          returns an int[numEdges][2] of all edges.
static int[][] getEdgesToDeleteForRandomSpanningTree(BayesianNetwork bn, Random r)
           
static int[][] getEdgesToDeleteForRandomSpanningTree(Table[] tables, Random r)
           
static int[][] getRandomSpanningTree(BayesianNetwork bn, Random rand)
          Samples a random spanning forest uniformly from the set of all spanning forests of the undirected network.
static int[][] getRandomSpanningTree(Table[] tables, Random r)
           
static void printEdges(int[][] edges)
           
static void printEdges(int[][] edges, String prefix, PrintStream stream)
           
static int[] sortEdges(int[][] edges)
          Sort edges, in-place, in topological order.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EDEdgeDeleter

public EDEdgeDeleter()
Method Detail

edgeToString

public static String edgeToString(int[] edge)

printEdges

public static void printEdges(int[][] edges)

printEdges

public static void printEdges(int[][] edges,
                              String prefix,
                              PrintStream stream)

sortEdges

public static int[] sortEdges(int[][] edges)
Sort edges, in-place, in topological order. Returns a map from old edge index to new edge index


getAllEdges

public static int[][] getAllEdges(BayesianNetwork bn)
returns an int[numEdges][2] of all edges. Edges are enumerated by identifying parent/child relationships in network cpts. Edges are topologically sorted.


getAllEdges

public static int[][] getAllEdges(Table[] tables)
returns an int[numEdges][2] of all edges. An edge is a variable -> table relationship, as in a factor graph. Edges are sorted, first by variable, then by table.


complementEdgeList

public static int[][] complementEdgeList(BayesianNetwork bn,
                                         int[][] inputEdges)
Returns all BN edges not given in inputEdges


complementEdgeList

public static int[][] complementEdgeList(Table[] tables,
                                         int[][] inputEdges)
Returns all factor graph edges not given in inputEdges


getRandomSpanningTree

public static int[][] getRandomSpanningTree(BayesianNetwork bn,
                                            Random rand)
Samples a random spanning forest uniformly from the set of all spanning forests of the undirected network. Uses a random walk. This takes _expected_ O(n log n) time, worst case O(n^3) time (for lollipop graph?).


getRandomSpanningTree

public static int[][] getRandomSpanningTree(Table[] tables,
                                            Random r)

getEdgesToDeleteForRandomSpanningTree

public static int[][] getEdgesToDeleteForRandomSpanningTree(Table[] tables,
                                                            Random r)

getEdgesToDeleteForRandomSpanningTree

public static int[][] getEdgesToDeleteForRandomSpanningTree(BayesianNetwork bn,
                                                            Random r)


Copyright 2010 UCLA Automated Reasoning Group