Polaris: SimEdgeKernel.h Source File

SimEdgeKernel.h

Go to the documentation of this file.
00001 #ifndef _SIMEDGEKERNEL_H
00002 #define _SIMEDGEKERNEL_H
00003 ///
00004 /// \class SimEdgeKernel 
00005 /// \brief a class for edges of undirected graphs
00006 /// \defgroup Base
00007 /// \ingroup Base
00008 ///  General utility routines
00009 /// \see SimEdgeKernel.h
00010 /// \see SimEdgeKernel.cc
00011 /// \see SimEdgeKernel.h
00012 ///
00013 /// \endcode
00014 /// \section Description Description
00015 /// This module contains the structures needed to represent
00016 /// the information internal to a SimEdge.  This object needs to be 
00017 /// wrapped in SimEdge to be useful outside the SimGraph class.
00018 /// Contains a matching Array for strides and spans of two AbstractAccess objects.
00019 ///
00020 /// \endcode
00021 /// \section KNOWN KNOWN/POSSIBLE BUGS/LIMITATIONS
00022 ///
00023 #ifdef POLARIS_GNU_PRAGMAS
00024 #pragma interface
00025 #endif
00026 ///
00027 enum SimilarityType { SIM_UNKNOWN,     
00028               SIM_EQUIV,        
00029               SIM_EQUIV_SEMI,
00030               SIM_DIM_EQUIV,     
00031               SIM_DIM_EQUIV_SEMI,
00032               SIM_STRIDE_EQUIV, 
00033               SIM_STRIDE_EQUIV_SEMI,
00034               SIM_NOT_SIMILAR, 
00035               SIM_DIM_EQUIV_UP, 
00036               SIM_STRIDE_EQUIV_UP };
00037 ///
00038 #include "ClassNames.h"
00039 #include "Listable.h"
00040 #include "Array.h"
00041 ///
00042 class SimEdgeKernel : public Listable {
00043 
00044  protected:
00045     SimilarityType _type;
00046     Array<bool> * _spanmatch;
00047     Array<int>  * _stridematch;
00048 
00049  public:
00050     SimEdgeKernel( );
00051     ~SimEdgeKernel( );
00052 
00053     SimilarityType type( ) const;  ///< return the type
00054     void type( SimilarityType type ); ///< assign the type
00055 
00056     void dump_in_match( SimilarityType, Array<int> * stride_match, Array<bool> * span_match );
00057 
00058     void spanmatch( Array<bool> * match );   ///< supply span match array
00059     void stridematch( Array<int> * match );  ///< supply stride match array
00060 
00061     Array<bool> *spanmatch( ) const;   ///< return span match array
00062     Array<int> *stridematch( ) const;      ///< return stride match array
00063 
00064     char * type_name( ) const;   ///< return the typename of the enclosed type
00065 
00066     ///< This one is to satisfy Listable
00067     virtual void    print(ostream & o) const;
00068 
00069     virtual SimEdgeKernel *clone() const;
00070     virtual Listable *listable_clone() const;
00071 
00072     friend ostream & operator << (ostream & o, const SimEdgeKernel & ad);
00073 };
00074 
00075 #endif
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:06:07 2005