CoCoALib-0.9905 date: 23 May 2007


ApproxPts.H

Go to the documentation of this file.
00001 #ifndef CoCoA_ApproxPts_H
00002 #define CoCoA_ApproxPts_H
00003 
00004 //   Copyright (c)  2006  Laura Torrente (assisted by John Abbott)
00005 
00006 //   This file is part of the source of CoCoALib, the CoCoA Library.
00007 
00008 //   CoCoALib is free software; you can redistribute it and/or modify
00009 //   it under the terms of the GNU General Public License (version 2)
00010 //   as published by the Free Software Foundation.  A copy of the full
00011 //   licence may be found in the file COPYING in this directory.
00012 
00013 //   CoCoALib is distributed in the hope that it will be useful,
00014 //   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 //   GNU General Public License for more details.
00017 
00018 //   You should have received a copy of the GNU General Public License
00019 //   along with CoCoA; if not, write to the Free Software
00020 //   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 
00022 
00023 #include <cmath>
00024 // using std::floor;
00025 #include <vector>
00026 // using std::vector;
00027 #include <iosfwd>
00028 //using std::ostream;
00029 
00030 namespace CoCoA
00031 {
00032 
00033   // Where should these functions live?
00034   inline double round(double x)
00035   {
00036     return std::floor(x+0.5);
00037   }
00038 
00039   inline double square(double x)
00040   {
00041     return x*x;
00042   }
00043 
00044   namespace ApproxPts
00045   {
00046 
00047     typedef std::vector<double> ApproxPt;
00048 
00049     void PreprocessGridAlgm(std::vector<ApproxPt>& NewPts, std::vector<ApproxPt> OrigPts, const std::vector<double>& semiwidth);
00050 
00051     void PreprocessAggrAlgm(std::vector<ApproxPt>& NewPts, std::vector<ApproxPt> OrigPts, const std::vector<double>& semiwidth);
00052 
00053     void PreprocessSubdivAlgm(std::vector<ApproxPt>& NewPts, std::vector<ApproxPt> OrigPts, const std::vector<double>& semiwidth);
00054 
00055 
00056   } // end of namespace preprocess
00057 
00058 } // end of namespace CoCoA
00059 
00060 
00061 
00062 // RCS header/log in the next few lines
00063 // $Header: /Volumes/Home/cocoa/cvs-repository/CoCoALib-0.99/include/CoCoA/ApproxPts.H,v 1.1.1.1 2007/03/09 15:16:11 abbott Exp $
00064 // $Log: ApproxPts.H,v $
00065 // Revision 1.1.1.1  2007/03/09 15:16:11  abbott
00066 // Imported files
00067 //
00068 // Revision 1.4  2006/12/06 17:09:37  cocoa
00069 // -- removed #include "config.H"
00070 //
00071 // Revision 1.3  2006/10/06 10:10:56  cocoa
00072 // Corrected position of #ifndef etc.
00073 //
00074 // Revision 1.2  2006/06/21 17:05:47  cocoa
00075 // Major overhaul of approx point preprocessing algms.
00076 //
00077 // Revision 1.1.1.1  2006/05/30 11:39:36  cocoa
00078 // Imported files
00079 //
00080 // Revision 1.2  2006/05/22 15:52:16  cocoa
00081 // Added preprocess-disg algorithm to ApproxPts.
00082 // Sundry minor improvements.
00083 //
00084 // Revision 1.1  2006/05/12 13:16:30  cocoa
00085 // Added functions for preprocessing approximate points.
00086 //
00087 //
00088 
00089 #endif

Generated on Wed May 23 13:43:34 2007 for CoCoALib by  doxygen 1.4.6