TooN.h

00001 //-*- c++ -*-
00002 
00003 // Copyright (C) 2005,2009 Tom Drummond (twd20@cam.ac.uk),
00004 // Ed Rosten (er258@cam.ac.uk), Gerhard Reitmayr (gr281@cam.ac.uk)
00005 //
00006 // This file is part of the TooN Library.  This library is free
00007 // software; you can redistribute it and/or modify it under the
00008 // terms of the GNU General Public License as published by the
00009 // Free Software Foundation; either version 2, or (at your option)
00010 // any later version.
00011 
00012 // This library is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 
00017 // You should have received a copy of the GNU General Public License along
00018 // with this library; see the file COPYING.  If not, write to the Free
00019 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00020 // USA.
00021 
00022 // As a special exception, you may use this file as part of a free software
00023 // library without restriction.  Specifically, if other files instantiate
00024 // templates or use macros or inline functions from this file, or you compile
00025 // this file and link it with other files to produce an executable, this
00026 // file does not by itself cause the resulting executable to be covered by
00027 // the GNU General Public License.  This exception does not however
00028 // invalidate any other reasons why the executable file might be covered by
00029 // the GNU General Public License.
00030 
00031 
00032 #ifndef TOON_INCLUDE_TOON_H
00033 #define TOON_INCLUDE_TOON_H
00034 #include <iostream>
00035 #include <cstdlib>
00036 #include <limits>
00037 #include <new>
00038 #include <TooN/internal/config.hh>
00039 #include <TooN/internal/typeof.hh>
00040 
00041 #ifdef TOON_INITIALIZE_RANDOM
00042 #include <ctime>
00043 #endif
00044 
00045 namespace TooN {
00046 
00047 #ifdef TOON_TEST_INTERNALS
00048     namespace Internal
00049     {
00050         struct BadIndex{};
00051         struct SliceError{};
00052         struct StaticSliceError{};
00053         struct SizeMismatch{};
00054         struct StaticSizeMismatch{};
00055 
00056     }
00057 #endif
00058     
00059     //Is the number a field? ie, *, -, *, / defined.
00060     //Specialize this to make TooN work properly with new types
00061     using std::numeric_limits;
00062     template<class C> struct IsField
00063     {
00064         static const int value = numeric_limits<C>::is_specialized;
00065     };
00066     
00067     namespace Internal
00068     {
00069         static const unsigned int max_bytes_on_stack=1000;
00070         struct Slicing{};
00071         template<int RowStride, int ColStride> struct Slice;
00072     }
00073 
00074     template<int Size, class Precision, class Base> struct Vector;
00075     template<int Rows, int Cols, class Precision, class Base> struct Matrix;
00076     template<int Size, class Precision, class Base> struct DiagonalMatrix;
00077     template<typename T> struct Operator;
00078     
00079     static const int Dynamic = -1;
00080 
00081     typedef double DefaultPrecision;
00082 }
00083 
00084 #include <TooN/internal/allocator.hh>
00085 
00086 #include <TooN/internal/size_mismatch.hh>
00087 #include <TooN/internal/slice_error.hh>
00088 #include <TooN/internal/debug.hh>
00089 
00090 #include <TooN/internal/vbase.hh>
00091 #include <TooN/internal/vector.hh>
00092     
00093 #include <TooN/internal/mbase.hh>
00094 #include <TooN/internal/matrix.hh>
00095 #include <TooN/internal/reference.hh>
00096 
00097 #include <TooN/internal/make_vector.hh>
00098 #include <TooN/internal/operators.hh>
00099     
00100 #include <TooN/internal/objects.h>
00101 
00102 #include <TooN/internal/diagmatrix.h>
00103 
00104 #endif

Generated on Thu May 7 20:28:41 2009 for TooN by  doxygen 1.5.3