[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Toon-members] TooN Doxyfile configure.ac doc/documentation.h ...
From: |
Edward Rosten |
Subject: |
[Toon-members] TooN Doxyfile configure.ac doc/documentation.h ... |
Date: |
Tue, 27 Oct 2009 16:05:40 +0000 |
CVSROOT: /cvsroot/toon
Module name: TooN
Changes by: Edward Rosten <edrosten> 09/10/27 16:05:40
Modified files:
. : Doxyfile configure.ac
doc : documentation.h
internal : vector.hh
Removed files:
test : simplex_test.cc
Log message:
Removed old file
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/Doxyfile?cvsroot=toon&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/TooN/configure.ac?cvsroot=toon&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/TooN/doc/documentation.h?cvsroot=toon&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/vector.hh?cvsroot=toon&r1=1.52&r2=1.53
http://cvs.savannah.gnu.org/viewcvs/TooN/test/simplex_test.cc?cvsroot=toon&r1=1.1&r2=0
Patches:
Index: Doxyfile
===================================================================
RCS file: /cvsroot/toon/TooN/Doxyfile,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- Doxyfile 14 Oct 2009 11:20:36 -0000 1.12
+++ Doxyfile 27 Oct 2009 16:05:39 -0000 1.13
@@ -23,7 +23,7 @@
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = 2.0.0-beta5
+PROJECT_NUMBER = 2.0.0-beta6
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
Index: configure.ac
===================================================================
RCS file: /cvsroot/toon/TooN/configure.ac,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- configure.ac 27 Jun 2009 12:27:15 -0000 1.7
+++ configure.ac 27 Oct 2009 16:05:39 -0000 1.8
@@ -1,4 +1,4 @@
-AC_INIT(TooN, version-2.0.0-beta2)
+AC_INIT(TooN, version-2.0.0-beta6)
AC_COPYRIGHT([Copyright T. Drummond, E. Rosten, G. Reitmayr 2006, 2007, 2008,
2009])
AC_LANG(C++)
AC_PROG_CXX
Index: doc/documentation.h
===================================================================
RCS file: /cvsroot/toon/TooN/doc/documentation.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- doc/documentation.h 14 Oct 2009 15:26:37 -0000 1.39
+++ doc/documentation.h 27 Oct 2009 16:05:39 -0000 1.40
@@ -60,7 +60,7 @@
- \ref sInitialize
- \ref sScalars
- \ref ssExamples
- - \ref sNoResize
+ - \ref sResize
- \ref sDebug
- \ref sSlices
- \ref sPrecision
@@ -275,7 +275,9 @@
Matrices can be filled from data in row-major order:
@code
- Matrix<3> m = Data(1, 2, 3, 4, 5, 6, 7, 8, 9);
+ Matrix<3> m = Data(1, 2, 3,
+ 4, 5, 6,
+ 7, 8, 9);
@endcode
A less general, but visually more pleasing syntax can also be
used:
@@ -321,13 +323,30 @@
\subsection sResize How do I resize a dynamic vector/matrix?
- You can't. Preventing resize allow all sorts of things to be const
- which is great for optimization. If you want a genuinely resizable
- structure, you may consider using a <code>std::vector</code>, and
accessing
- it as a TooN object when appropriate. See \ref sWrap. Also, the
- speed and complexity of resizable matrices depends on the memory
layout, so
- you may wish to use column major matrices as opposed to the default row
- major layout.
+ Do you really want to? If you do, then you have to declare it:
+
+ @code
+ Vector<Resizable> v;
+ v.resize(3);
+ v = makeVector(1, 2, 3);
+
+ v = makeVector(1, 2); //Error!
+ @endcode
+
+ The policy behind the design of TooN is that it is a linear algebra
library,
+ not a generic container library, so resizable vectors <b>ONLY</b> change
+ their size with a call to <code>.resize()</code>. Assigning mismatched
+ sizes is a fatal error, just like with static and dynamic vectors.
Resizing
+ is efficient since it is implemented internally with
+ <code>std::vector</code>. Note that upon resize, existing data
elements are
+ retained but new data elements are uninitialized.
+
+ Currently, resizable matrices are unimplemented. If you want a
resizable
+ matrix, you may consider using a <code>std::vector</code>, and
accessing it
+ as a TooN object when appropriate. See \ref sWrap. Also, the speed and
+ complexity of resizable matrices depends on the memory layout, so you
may
+ wish to use column major matrices as opposed to the default row major
+ layout.
\subsection sDebug What debugging options are there?
Index: internal/vector.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/vector.hh,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -b -r1.52 -r1.53
--- internal/vector.hh 14 Oct 2009 15:19:57 -0000 1.52
+++ internal/vector.hh 27 Oct 2009 16:05:40 -0000 1.53
@@ -355,6 +355,26 @@
/// What is the size of this vector?
int size() const;
+ /// Resize the vector. This is only provided if the vector is
+ /// declared as Resizable. Existing elements are retained, new
+ /// elements are uninitialized. Resizing has the same efficiency
+ /// guarantees as <code>std::vector</code>.
+ /// @param s The new size.
+ ///
+ /// @internal
+ /// This method is not defined by Vector: it is inherited.
+ void resize(int s);
+
+ /// Return a pointer to the first element of the vector. This method
+ /// is only provided for non-slice vectors, i.e. a subset of the cases
+ /// where the memory is guaranteed to be contiguous.
+ ///
+ /// @internal
+ /// This method is not defined by Vector: it is inherited.
+ Precision* get_data_ptr();
+
+
+
/// @}
/// @name Reshaping, sub-vectors and matrices
Index: test/simplex_test.cc
===================================================================
RCS file: test/simplex_test.cc
diff -N test/simplex_test.cc
--- test/simplex_test.cc 27 May 2009 13:17:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,42 +0,0 @@
-#include <TooN/optimization/downhill_simplex.h>
-using namespace std;
-using namespace TooN;
-
-
-double sq(double x)
-{
- return x*x;
-}
-
-double Rosenbrock(const Vector<2>& v)
-{
- return sq(1 - v[0]) + 100 * sq(v[1] - sq(v[0]));
-}
-
-double Spiral(const Vector<2>& v)
-{
- double x = v[0];
- double y = v[1];
- return sin(20.0*sqrt(x*x+y*y)+2.0*atan(y/x))+2.0*x*x+2.0*y*y;
-}
-
-
-int main()
-{
- Vector<2> starting_point = makeVector(1.5, 1.5);
-
- DownhillSimplex<2> dh_fixed(Spiral, starting_point, .001);
-
- while(dh_fixed.iterate(Spiral))
- {
- // cout << dh_fixed.get_values()[dh_fixed.get_best()] <<
endl;
- cout << dh_fixed.get_simplex()[0] <<
dh_fixed.get_values()[0] << endl;
- cout << dh_fixed.get_simplex()[1] <<
dh_fixed.get_values()[1] << endl;
- cout << dh_fixed.get_simplex()[2] <<
dh_fixed.get_values()[2] << endl;
- cout << endl;
- }
-
- //cout << dh_fixed.get_simplex()[dh_fixed.get_best()] << endl;
-}
-
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Toon-members] TooN Doxyfile configure.ac doc/documentation.h ...,
Edward Rosten <=