cc.mallet.grmm.types
Class UndirectedGrid

java.lang.Object
  extended by cc.mallet.grmm.types.FactorGraph
      extended by cc.mallet.grmm.types.UndirectedModel
          extended by cc.mallet.grmm.types.UndirectedGrid
All Implemented Interfaces:
Factor, java.io.Serializable, java.lang.Cloneable

public class UndirectedGrid
extends UndirectedModel

A grid-shaped undirected graphical model. All this adds to the base UndirectedModel class is the ability to retrieve variables by their (x,y) position. Created: Mar 28, 2005

Version:
$Id: UndirectedGrid.java,v 1.1 2007/10/22 21:37:44 mccallum Exp $
Author:
Serialized Form

Constructor Summary
UndirectedGrid(int width, int height, int numOutcomes)
          Creates an undirected grid and its associated Variable objects.
 
Method Summary
 Variable get(int x, int y)
           
 int getHeight()
           
 int getWidth()
           
 
Methods inherited from class cc.mallet.grmm.types.UndirectedModel
addFactor, createBoltzmannMachine, getEdgeSet, isConnected
 
Methods inherited from class cc.mallet.grmm.types.FactorGraph
addFactor, afterFactorAdd, allFactorsContaining, allFactorsContaining, allFactorsOf, allFactorsOf, almostEquals, almostEquals, argmax, assignmentIterator, asTable, beforeFactorAdd, clear, containsVar, divideBy, dump, dump, dumpToString, duplicate, entropy, exponentiate, extractMax, extractMax, extractMax, factorOf, factorOf, factorOf, factorOf, factorProduct, factors, factorsIterator, findVariable, get, getAdjacentVertices, getDegree, getFactor, getIndex, getIndex, getInferenceCache, getVariable, isAdjacent, isNaN, logify, logValue, logValue, logValue, marginalize, marginalize, marginalize, marginalizeOut, marginalizeOut, multiply, multiplyBy, normalize, numVariables, prettyOutputString, printAsDot, printAsDot, remove, remove, sample, sampleContinuousVars, setInferenceCache, slice, slice, sum, toString, value, value, variablesIterator, variablesSet, varSet, varSetIterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UndirectedGrid

public UndirectedGrid(int width,
                      int height,
                      int numOutcomes)
Creates an undirected grid and its associated Variable objects.

Parameters:
width - The max x coordinate of the grid.
height - The max y coordinate of thee grid.
numOutcomes - The number of outcomes of each created variable.
Method Detail

getWidth

public int getWidth()

getHeight

public int getHeight()

get

public Variable get(int x,
                    int y)