• Main Page
  • Classes
  • Files
  • File List
  • File Members

chaincon/homgvf.h

Go to the documentation of this file.
00001 /////////////////////////////////////////////////////////////////////////////
00002 ///
00003 /// \file
00004 ///
00005 /// Homology gradient vector field computation: An interface to all the
00006 /// algorithms available in this package.
00007 ///
00008 /////////////////////////////////////////////////////////////////////////////
00009 
00010 // Copyright (C) 2009-2011 by Pawel Pilarczyk.
00011 //
00012 // This file is part of my research software package. This is free software:
00013 // you can redistribute it and/or modify it under the terms of the GNU
00014 // General Public License as published by the Free Software Foundation,
00015 // either version 3 of the License, or (at your option) any later version.
00016 //
00017 // This software is distributed in the hope that it will be useful,
00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00020 // GNU General Public License for more details.
00021 //
00022 // You should have received a copy of the GNU General Public License
00023 // along with this software; see the file "license.txt". If not,
00024 // please, see <http://www.gnu.org/licenses/>.
00025 
00026 // Started on March 24, 2009. Last revision: April 3, 2011.
00027 
00028 
00029 #ifndef _CHAINCON_HOMGVF_H_
00030 #define _CHAINCON_HOMGVF_H_
00031 
00032 
00033 // include relevant local header files
00034 #include "chaincon/homgvf0.h"
00035 #include "chaincon/homgvf1.h"
00036 #include "chaincon/homgvf2.h"
00037 #include "chaincon/homgvf3.h"
00038 
00039 
00040 // --------------------------------------------------
00041 // ------------------ Homology GVF ------------------
00042 // --------------------------------------------------
00043 
00044 /// Computes the homology gradient vector field for a given
00045 /// filtered finite cell complex "K".
00046 /// This function is an interface to the various algorithms
00047 /// available in this package, numbered from 0 to 3.
00048 /// Cells that represent homology generators are appended to the vector "H".
00049 /// The projection map "pi", the inclusion from "H" to the complex "K",
00050 /// and the homology gradient vector field "phi"
00051 /// are assumed to be initially zero and are constructed.
00052 template <class CellT, class CellArray1, class CellArray2>
00053 void homologyGVF (const CellArray1 &K, CellArray2 &H,
00054         tCombLinMap<CellT,CellT> &pi,
00055         tCombLinMap<CellT,CellT> &incl,
00056         tCombLinMap<CellT,CellT> &phi, int version)
00057 {
00058         switch (version)
00059         {
00060         case 0:
00061                 homologyGVF0 (K, H, pi, incl, phi);
00062                 break;
00063         case 1:
00064                 homologyGVF1 (K, H, pi, incl, phi);
00065                 break;
00066         case 2:
00067                 homologyGVF2 (K, H, pi, incl, phi);
00068                 break;
00069         case 3:
00070                 homologyGVF3 (K, H, pi, incl, phi);
00071                 break;
00072         default:
00073                 throw "Wrong homology algorithm requested.";
00074         }
00075         return;
00076 } /* homologyGVF */
00077 
00078 
00079 #endif // _CHAINCON_HOMGVF_H_
00080 

Generated on Tue Apr 5 2011 00:06:32 for Chain Contraction Software by  doxygen 1.7.2