/* This file implements structures for edge and node aux variables. Copyright (C) 2004 The University of Texas at Austin This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Email: usman@cs.njit.edu Mail: Usman Roshan, Department of Computer Sciences, NJIT-CCS, Computer Science Department, GITC 4400, University Heights, Newark, NJ 07102 */ #include #include #include node_aux_vars new_node_aux_vars(){ node_aux_vars node_vars; node_vars = (node_aux_vars) malloc(sizeof(struct node_aux_vars_struct)); node_vars->taxon_id = -1; node_vars->taxa_size = 0; node_vars->taxaset = new_int_set(32); return node_vars; } void del_node_aux_vars(node_aux_vars n){ assert(n); if(n->taxaset) del_int_set(n->taxaset); free(n); } edge_aux_vars new_edge_aux_vars(){ edge_aux_vars edge_vars; edge_vars = (edge_aux_vars) malloc(sizeof(struct edge_aux_vars_struct)); return edge_vars; } void del_edge_aux_vars(edge_aux_vars e){ assert(e); free(e); } void assign_node_aux_vars(node_aux_vars dest, node_aux_vars src){ dest->taxon_id = src->taxon_id; dest->taxa_size = src->taxa_size; assign_int_set(dest->taxaset, src->taxaset); } void assign_edge_aux_vars(edge_aux_vars dest, edge_aux_vars src){ dest->wgt = src->wgt; }