Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

negfunc.h

00001 /***************************************************************************
00002                           cvr3dneg.h  -  description
00003                              -------------------
00004     begin                : Thu Apr 20 2000
00005     copyright            : (C) 2000 by Michael Peeters
00006     email                : Michael.Peeters@vub.ac.be
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef NEGFUNC_H
00019 #define NEGFUNC_H
00020 
00021 #include "vectorfunction.h"
00022 #include "numvector.h"
00023 
00024 namespace MODEL {
00025 
00029 // Prev: template <integer dims, class NT = NumericTraits<real,dims> >
00030 template<integer dims, typename nelem=number, class NT = NumericTraits<nelem,dims> >
00031 class NegFunc : public VectorFunction<dims,nelem,NT>{
00032 
00033         typedef VectorFunction<dims,NT>                 base;
00034         typedef typename NT::vect                               vect;
00035         
00036         public:                         
00038                 virtual NegFunc* clone () const
00039                                 { return new NegFunc(*this); }
00040 
00041                 virtual const vect& function(vect& fu, const vect& u)
00042                                 {
00043                                         fu=-u;
00044                                         return fu;
00045                                 }       
00046 };
00047 
00048 } // end namespace
00049 #endif
00050 
00051 /*********************************************************************
00052 $Id: negfunc.h,v 1.1 2001/05/22 10:54:55 mpeeters Exp $
00053 **********************************************************************
00054 
00055 $Log: negfunc.h,v $
00056 Revision 1.1  2001/05/22 10:54:55  mpeeters
00057 Moved sources and headers for libModel to model/ subdirectory, in an attempt to rationalize the source tree. This should make things "netter".
00058 
00059 Revision 1.2  2000/09/15 10:26:31  mpeeters
00060 Cleaned out header and added CVS tails to files, removed superfuous
00061 @author comments, inserted dates
00062 
00063 *********************************************************************/

To get the sources or tarballs, please go to SourceForge or you can use the CVS repository.

More Info? Michael Peeters. Also, check our research website: www.alna.vub.ac.be

Last update: June 2002.


Looking for Open Source? Check out SourceForge Logo !