[Javabdd-checkins] JavaBDD/net/sf/javabdd BDDFactory.java,1.12,1.13
Brought to you by:
joewhaley
From: John W. <joe...@us...> - 2005-05-10 02:56:25
|
Update of /cvsroot/javabdd/JavaBDD/net/sf/javabdd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6727/net/sf/javabdd Modified Files: BDDFactory.java Log Message: Added getVarOrder(). Index: BDDFactory.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/net/sf/javabdd/BDDFactory.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** BDDFactory.java 6 May 2005 23:50:47 -0000 1.12 --- BDDFactory.java 10 May 2005 02:56:15 -0000 1.13 *************** *** 836,840 **** * neworder. The variable parameter neworder is interpreted as a sequence * of variable indices and the new variable order is exactly this sequence. ! * The array must contain all the variables defined so far. If, for * instance the current number of variables is 3 and neworder contains * [1; 0; 2] then the new variable order is v1<v0<v2.</p> --- 836,840 ---- * neworder. The variable parameter neworder is interpreted as a sequence * of variable indices and the new variable order is exactly this sequence. ! * The array must contain all the variables defined so far. If, for * instance the current number of variables is 3 and neworder contains * [1; 0; 2] then the new variable order is v1<v0<v2.</p> *************** *** 849,852 **** --- 849,866 ---- /** + * <p>Gets the current variable order.</p> + * + * @return variable order + */ + public int[] getVarOrder() { + int n = varNum(); + int[] result = new int[n]; + for (int i = 0; i < n; ++i) { + result[i] = level2Var(i); + } + return result; + } + + /** * <p>Make a new BDDPairing object.</p> * |