source: vis_dev/glu-2.3/src/mdd/mvar2bdds.c @ 104

Last change on this file since 104 was 13, checked in by cecile, 13 years ago

library glu 2.3

File size: 1.2 KB
Line 
1#include "mdd.h"
2
3/*
4 * MDD Package
5 *
6 * $Id: mvar2bdds.c,v 1.10 2002/08/27 03:16:56 fabio Exp $
7 *
8 * Author: Timothy Kam
9 *
10 * Copyright 1992 by the Regents of the University of California.
11 *
12 * All rights reserved.  Permission to use, copy, modify and distribute
13 * this software is hereby granted, provided that the above copyright
14 * notice and this permission notice appear in all copies.  This software
15 * is made available as is, with no warranties.
16 */
17
18array_t *
19mvar2bdds(mdd_manager *mgr, array_t *mvars)
20{
21    array_t *bdd_vars;
22    int i, j, mv_no;
23    mvar_type mv;
24    bdd_t *temp;
25    array_t *mvar_list = mdd_ret_mvar_list(mgr);
26
27    bdd_vars = array_alloc(bdd_t *, 0); 
28    for (i=0; i<array_n(mvars); i++) {
29        mv_no = array_fetch(int, mvars, i);
30        mv = array_fetch(mvar_type, mvar_list, mv_no);
31        for (j = 0; j < mv.encode_length; j ++) {
32            temp = bdd_get_variable(mgr, mdd_ret_bvar_id(&mv,j) );
33            array_insert_last(bdd_t *, bdd_vars, temp);
34        }
35    }
36    return (bdd_vars);
37}
38
39/*---------------------------------------------------------------------------*/
40/* Static function prototypes                                                */
41/*---------------------------------------------------------------------------*/
42
Note: See TracBrowser for help on using the repository browser.