iset_iso_check.h

00001 /*
00002  *  Copyright (C) 2005 M.J. Zaki <zaki@cs.rpi.edu> Rensselaer Polytechnic Institute
00003  *  Written by parimi@cs.rpi.edu
00004  *  Updated by chaojv@cs.rpi.edu, alhasan@cs.rpi.edu, salems@cs.rpi.edu
00005  *
00006  *  This program is free software; you can redistribute it and/or
00007  *  modify it under the terms of the GNU General Public License
00008  *  as published by the Free Software Foundation; either version 2
00009  *  of the License, or (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License along
00017  *  with this program; if not, write to the Free Software Foundation, Inc.,
00018  *  59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
00019  */
00020 #ifndef _ISET_ISO_CHECK_H_
00021 #define _ISET_ISO_CHECK_H_
00022 
00023 #include "typedefs.h"
00024 
00025 template<class PP, class MP, class ST, template<typename, typename, typename, template <typename> class > class CC,
00026          template <typename> class ALLOC >
00027 class pattern;
00028 
00029 class no_edges;
00030 
00031 template<class prop, class next_property>
00032 class proplist;
00033 
00034 /*
00035  * Method performs isomorphism checking for itemsets.
00036  * Also update the canonical code for the pattern.
00037  *
00038  * Method returns true to indicate that the pattern is canonical. For itemsets this is 
00039  * always true due to the manner in which we generate candidates. 
00040  */
00041 template<typename PP, class MP, class PAT_ST, template<class, typename, typename, template <typename> class > class CAN_CODE, 
00042          template <typename> class ALLOC >
00043 bool check_isomorphism(pattern<ISET_PROP, MP, PAT_ST, CAN_CODE, ALLOC>* const& cand_pat) { 
00044   // NOTE:
00045   // The candidate generation process results in no isomorphism check for itemsets.
00046 
00047   // Update canonical code.
00048   cand_pat->_canonical_code.insert_vertex(cand_pat->rmost_vertex());
00049 
00050   cand_pat->_is_canonical = true;
00051   return true;
00052 }
00053 
00054 #endif

Generated on Wed Jul 26 14:01:08 2006 for DMTL by  doxygen 1.4.7