edu.ucla.belief.dtree
Class Hypergraph

Object
  extended by Hypergraph

public class Hypergraph
extends Object

This class represents Hypergraph objects.

Author:
David Allen

Constructor Summary
Hypergraph(int numHyperNodes)
          Create a Hypergraph.
Hypergraph(List leafNodes)
          Create a Hypergraph from a List of DtreeNodeLeafs.
Hypergraph(Map edgeToColNodes, int numHyperNodes)
          Create a Hypergraph.
 
Method Summary
static Hypergraph createFromIL2Indexes(List leafNodes)
           
 Collection edgeSet()
           
 Integer getWeight(Object edge)
           
 Collection hyperNodes()
           
 boolean isWeighted()
           
 Collection nodeSet(Object edge)
           
 int numEdges()
           
 int numNodes()
           
 void putHyperedge(Object edge, Collection col)
           
 void setEdgeWeight(Object edge, Integer wt)
          Sets the weight of the edge to wt.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hypergraph

public Hypergraph(List leafNodes)
Create a Hypergraph from a List of DtreeNodeLeafs.


Hypergraph

public Hypergraph(Map edgeToColNodes,
                  int numHyperNodes)
Create a Hypergraph.

Parameters:
edgeToColNodes - A Map from each hyperedge (FiniteVariable) to a Collection of hypernodes (represented as Integers from 0..numNodes-1).
numHyperNodes - The number of HyperNodes in the graph, it must be one or larger (once set, this cannot be changed).

Hypergraph

public Hypergraph(int numHyperNodes)
Create a Hypergraph.

Parameters:
numHyperNodes - The number of HyperNodes in the graph, it must be one or larger (once set, this cannot be changed).
Method Detail

createFromIL2Indexes

public static Hypergraph createFromIL2Indexes(List leafNodes)

setEdgeWeight

public void setEdgeWeight(Object edge,
                          Integer wt)
Sets the weight of the edge to wt.


numNodes

public int numNodes()

numEdges

public int numEdges()

edgeSet

public Collection edgeSet()

nodeSet

public Collection nodeSet(Object edge)

isWeighted

public boolean isWeighted()

getWeight

public Integer getWeight(Object edge)

hyperNodes

public Collection hyperNodes()

putHyperedge

public void putHyperedge(Object edge,
                         Collection col)


Copyright 2010 UCLA Automated Reasoning Group