Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cc.mallet.grmm.types
Class UndirectedModel

    java.lang.Object
      cc.mallet.grmm.types.FactorGraph
          cc.mallet.grmm.types.UndirectedModel

All Implemented Interfaces:
  Factor, java.io.Serializable, java.lang.Cloneable

Direct Known Subclasses:
  ACRF.UnrolledGraph, UndirectedGrid

    public class UndirectedModel

extends FactorGraph

Class for pairwise undirected graphical models, also known as pairwise Markov random fields. This is a thin wrapper over FactorGraph, with only a few methods added that don't make sense for non-pairwise graphs. Created: Dec 21, 2005

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

Constructor Summary
`UndirectedModel()`
`UndirectedModel(int capacity)`
`UndirectedModel(Variable[] vars)`

Method Summary
`void` | `addFactor(Factor factor)` Adds a factor to the model.
`static UndirectedModel` | `createBoltzmannMachine(double[][] weights, double[] biases)` Creates an undirected model that corresponds to a Boltzmann machine with the given weights and biases.
`java.util.Set` | `getEdgeSet()`
`boolean` | `isConnected(Variable v1, Variable v2)`

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, 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

### UndirectedModel

    public UndirectedModel()

### UndirectedModel

    public UndirectedModel(Variable[] vars)

### UndirectedModel

    public UndirectedModel(int capacity)

Method Detail

### getEdgeSet

    public java.util.Set getEdgeSet()

### addFactor

    public void addFactor(Factor factor)

  Description copied from class: `FactorGraph`
  Adds a factor to the model.

  If a factor has already been added for the variables in the given clique, the effects of this method are (currently) undefined.

  All convenience methods for adding factors eventually call through to this one, so this is the method for subclasses to override if they wish to perform additional actions when a factor is added to the graph.

  Overrides:
    `addFactor` in class `FactorGraph`
  Parameters:
    `factor` - A factor over the variables in clique.

### createBoltzmannMachine

    public static UndirectedModel createBoltzmannMachine(double[][] weights,
                                                         double[] biases)

  Creates an undirected model that corresponds to a Boltzmann machine with the given weights and biases.

  Parameters:
    `weights` -
    `biases` -
  Returns:
    An appropriate UndirectedModel.

### isConnected

    public boolean isConnected(Variable v1,
                               Variable v2)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD