1 /* This file is part of libDAI - http://www.libdai.org/

2 *

3 * Copyright (c) 2006-2011, The libDAI authors. All rights reserved.

4 *

5 * Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

6 */

9 #include <dai/varset.h>

10 #include <dai/index.h>

11 #include <iostream>

20 // Define set X = {x0, x1}

24 cout << "X = " << X << endl << endl; // Note that the elements of X are ordered according to their labels

26 // Output some information about x0, x1 and X

29 cout << "VarSet " << X << " has " << X.nrStates() << " states (joint assignments of its variables)." << endl << endl;

35 // store s0 and s1 in a map "states"

40 // output states of x0, x1 and corresponding state of X

43 // calcState() is the inverse of calcLinearState()

45 }

50 // calculate states of x0 and x1 corresponding to state S of X

53 // output state of X and corresponding states of x0, x1

56 // calcLinearState() is the inverse of calcState()

58 }

63 // output state of X and corresponding states of x0, x1

65 }

68 }