changeset 61:b3bf4ac981ec default tip

Update the doxygen documentation
author Jordi Gutiérrez Hermoso <jordigh@gmail.com>
date Sat, 29 May 2010 20:01:40 -0500
parents 0288895c1071
children
files Doxyfile src/include/bvp.hpp src/include/diff_op.hpp src/include/error.hpp src/include/func.hpp src/include/interp_values.hpp src/include/interpolator.hpp src/include/linalg.hpp src/include/rbf.hpp src/include/utils.hpp src/include/vtkplot.hpp src/interp_values.cpp src/linalg.cpp src/vtkplot.cpp
diffstat 14 files changed, 84 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/Doxyfile
+++ b/Doxyfile
@@ -156,13 +156,6 @@
 
 MULTILINE_CPP_IS_BRIEF = NO
 
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member 
-# documentation.
-
-DETAILS_AT_TOP         = NO
-
 # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
 # member inherits the documentation from any documented member that it 
 # re-implements.
@@ -350,7 +343,7 @@
 # will show members with their full class and namespace scopes in the 
 # documentation. If set to YES the scope will be hidden.
 
-HIDE_SCOPE_NAMES       = NO
+HIDE_SCOPE_NAMES       = YES
 
 # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
 # will put a list of the files that are included by a file in the documentation 
@@ -1239,7 +1232,7 @@
 # If set to YES, the inheritance and collaboration graphs will show the 
 # relations between templates and their instances.
 
-TEMPLATE_RELATIONS     = NO
+TEMPLATE_RELATIONS     = YES
 
 # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
 # tags are set to YES then doxygen will generate a graph for each documented 
--- a/src/include/bvp.hpp
+++ b/src/include/bvp.hpp
@@ -6,7 +6,7 @@
  *  classes declared in bvp.hpp
  */
 
-#pramga once
+#pragma once
 
 #include <map>
 #include <set>
@@ -18,6 +18,8 @@
 
 
 namespace kwantix{
+/** \defgroup BVP */
+/// \{
 using std::map;
 using std::set;
 using std::string;
@@ -216,6 +218,7 @@
   ///Give the interior diff_op.
   shared_ptr<const linear_diff_op2> get_linear_diff_op2() const;
 };
+/// \}
 
 }//namespace kwantix
 
--- a/src/include/diff_op.hpp
+++ b/src/include/diff_op.hpp
@@ -13,6 +13,8 @@
 #include "func.hpp"
 
 namespace kwantix{
+/** \defgroup BVP */
+/// \{
 /*
  *Class graph: (other leaves may also be present)
  *
@@ -41,7 +43,7 @@
  * point for a real-valued function that take a vector
  * argument. This is a pure abstract class.
  */
-class diff_op{ 
+class diff_op{
 public:
   ///Evaluate the function \f$f\f$ at the point \f$p\f$.
   /** All this does is call the pure virtual at(realfunc, point)
@@ -146,5 +148,5 @@
 public:
   double at(const realfunc &f, const point &p) const;
 };
-
+///\}
 }//namespace kwantix
--- a/src/include/error.hpp
+++ b/src/include/error.hpp
@@ -21,6 +21,9 @@
 //Structs to be thrown as exceptions
 using std::string;
 
+/*! \defgroup error */
+/// \{
+
 /// generic error and base struct.   /*GSL_FAILURE  = -1,*/
 class error{   
 public:
@@ -67,6 +70,8 @@
 struct cannotReachToleranceInGradient ;
 struct endOfFile ;
 
+
+
 /*! \brief Custom error handler to be used for GSL. 
  * 
  * Throw exceptions instead of calling abort().
@@ -77,11 +82,8 @@
  */
 void errorHandler(const char * reason, const char * file, 
                   int line, int gsl_errno); 
-}
-
 
 //A few more details about the structs we're throwing as exceptions.
-namespace kwantix{
 using std::string;
 
 ///GSL_CONTINUE = -2,  /* iteration has not converged */
@@ -324,4 +326,6 @@
     badArgument(r,f,l) {};
 };
 
+/// \}
+
 }//namespace kwantix
--- a/src/include/func.hpp
+++ b/src/include/func.hpp
@@ -18,6 +18,8 @@
 
 namespace kwantix{
 
+/// \defgroup BVP
+
 /*! \brief  A real-valued function from \f$\mathbb{R}^n\f$ to
  *  \f$\mathbb{R}\f$ .
  *
@@ -107,4 +109,6 @@
   static gsl_function* f;
 };
 
+/// \}
+
 } //namespace kwantix
--- a/src/include/interp_values.hpp
+++ b/src/include/interp_values.hpp
@@ -1,13 +1,24 @@
+/** \file  interp_values.hpp
+ *  \brief Auxiliary interp_values class and associated classes for
+ *  describing the values of an interpolator  
+ *
+ *  \file interp_values.cpp
+ *  \brief Implementations and pinstantiations of the functions and
+ *  classes declared in interp_values.hpp
+ */
 #pragma once
 
 #include "linalg.hpp"
 #include <map>
 #include <boost/shared_ptr.hpp>
 
+
 namespace kwantix{
 using std::map;
 using boost::shared_ptr;
 
+/** \defgroup Interpolator */
+/// \{
 class bdry_values;
 
 //FIXME: Give this a better name
@@ -19,7 +30,7 @@
    */
   bdry_values operator()(size_t k) const;
     
-  /*! \name comparisons 
+  /** \name comparisons 
    *
    * Normals are the same if they correspond to the same domain
    *(i.e. if their hash coincides)
@@ -147,7 +158,7 @@
     : interp_values(v_in, rbfs_hash_in, n_in, m_in) {};
 };
 
-
+/// \}
 
 
 
@@ -162,3 +173,4 @@
 //@}
 
 }//namespace kwantix
+
--- a/src/include/interpolator.hpp
+++ b/src/include/interpolator.hpp
@@ -24,6 +24,8 @@
 using std::map;
 using boost::shared_ptr;
 
+/** \defgroup Interpolator */
+/// \{
 class vtkplot;
 
 //FIXME: Break this up into an ansatz class and an interpolator
@@ -274,6 +276,7 @@
   /// Convert vector of values to a map
   map<point, double> valsvec2map(const  kwantix::vector& values) const;
 };
+/// \}
 
 
 /// For comfortable syntax
@@ -291,4 +294,5 @@
   return os;
 }
 
-}//namespace kwnatix
+}//namespace kwantix
+
--- a/src/include/linalg.hpp
+++ b/src/include/linalg.hpp
@@ -21,6 +21,9 @@
 
 namespace kwantix{
 
+/*! \defgroup linalg*/
+/// \{
+
 class slice; 
 class vector;
 class vector_view;
@@ -397,9 +400,7 @@
   
 /// Useful alias, vectors are also points in space.
 typedef vector point; //Useful alias.
-}
 
-namespace kwantix{ //Non-member functions.
   
 /*! @name I/O
  */
@@ -438,11 +439,8 @@
 /// L2 condition number, computed with SVD.
 double cond(matrix& A);
 //@}
-}
 
 //Inlined functions
-namespace kwantix{
-
 inline double& matrix::operator()(const size_t i, const size_t j){
   try{
     if(LUfactored)
@@ -510,4 +508,6 @@
   }
 }
 
+/// \}
+
 }//namespace kwantix
--- a/src/include/rbf.hpp
+++ b/src/include/rbf.hpp
@@ -11,8 +11,12 @@
 #include "error.hpp"
 #include "func.hpp"
 
+///Single namespace for kwantix
 namespace kwantix{
 
+/** \defgroup RBF */
+/// \{
+
 ///An exception struct for RBFs when attempting to use the wrong dimension.
 struct badDimension : public badArgument{
   badDimension() {};
@@ -218,5 +222,7 @@
   double d(double r) const;
   double d2(double r) const;
 };
+/// \}
 
 }//namespace kwantix
+
--- a/src/include/utils.hpp
+++ b/src/include/utils.hpp
@@ -14,6 +14,9 @@
 #include "linalg.hpp"
 
 namespace kwantix{
+/*! \defgroup utils */
+/// \{
+
 ///Clears whitespace from front and back of string s.
 std::string trim(const std::string& s);
 
@@ -43,4 +46,6 @@
 ///Outputs some information about generic exceptions.
 void show_exception(kwantix::error exc);
 
+/// \}
+
 }//namespace kwantix
--- a/src/include/vtkplot.hpp
+++ b/src/include/vtkplot.hpp
@@ -1,3 +1,11 @@
+/*! \file  vtkplot.hpp
+ * \brief VTK plotting utils
+ *
+ *  \file vtkplot.cpp
+ *  \brief Implementations and pinstantiations of the functions and
+ *  classes declared in vtkplot.hpp
+ */
+
 #pragma once
 
 #include <string>
@@ -8,16 +16,21 @@
 #include <vtkRenderer.h>
 
 #include "interpolator.hpp"
+
 namespace kwantix{
 
+/** \defgroup VTK */
+/// \{
 ///A class for creating VTK plots
 class vtkplot{
 public:
   /*! \brief Constructor performs a Delaunay triangulation on data
-   * \param data - An \f$n \times 3\f$ matrix where the first two
-   *               columns are points in the x-y plane on which a
-   *               Delaunay triangulation will be done, and the
-   *               third column is the value at this point.
+   * \param u - An interpolator on a 2d domain 
+   * \param zmin_in - Minimum value this interpolator is expected to take
+   *                  (for colouring purposes)
+   * \param zmax_in - Maximum value this interpolator is expected to take
+   *                  (for colouring purposes)
+   * \param offscreen_in - Whether it will be offscreen plotting or not
    */
   template<typename RBF>
   vtkplot(const interpolator<RBF>& u, 
@@ -80,4 +93,7 @@
   bool offscreen;
 };
 
+/// \}
+
 } //namespace kwantix
+///\}
--- a/src/interp_values.cpp
+++ b/src/interp_values.cpp
@@ -1,3 +1,5 @@
+
+
 #include "include/interp_values.hpp"
 
 namespace kwantix{
--- a/src/linalg.cpp
+++ b/src/linalg.cpp
@@ -959,7 +959,7 @@
       //but do we really want to compile Octave on C++
       //implementations that don't follow IEEE arithmetic?
       else if(token == "NaN")
-      { 
+      {
         double x = std::numeric_limits<double>::quiet_NaN();
         data.push_back(x);
         cols++;
--- a/src/vtkplot.cpp
+++ b/src/vtkplot.cpp
@@ -1,6 +1,3 @@
-#include "include/vtkplot.hpp"
-#include "include/rbf.hpp"
-
 #include <vtkPoints.h>
 #include <vtkPointData.h>
 #include <vtkDelaunay2D.h>
@@ -47,6 +44,9 @@
 
 #include <boost/function.hpp>
 
+#include "include/rbf.hpp"
+#include "include/vtkplot.hpp"
+
 namespace kwantix{
 
 template<typename RBF>
@@ -74,6 +74,7 @@
 }
 
 //Instantiations
+/// \cond
 template vtkplot::vtkplot(const interpolator<conical>&, 
                           double, double, bool);
 template vtkplot::vtkplot(const interpolator<thin_plate_spline>&, 
@@ -86,6 +87,7 @@
                           double, double, bool);
 template vtkplot::vtkplot(const interpolator<gaussian>&, 
                           double, double, bool);
+/// \endcond
 
 void vtkplot::set_offscreen(bool offscreen_in)
 {