[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Toon-members] TooN Doxyfile TODO doc/documentation.h internal...
From: |
Edward Rosten |
Subject: |
[Toon-members] TooN Doxyfile TODO doc/documentation.h internal... |
Date: |
Fri, 01 May 2009 09:47:16 +0000 |
CVSROOT: /cvsroot/toon
Module name: TooN
Changes by: Edward Rosten <edrosten> 09/05/01 09:47:16
Modified files:
. : Doxyfile TODO
doc : documentation.h
internal : matrix.hh mbase.hh objects.h vector.hh
Added files:
test : diagslice.cc
Log message:
.diagonal_slice()
operator-= for Operator
Documentation update.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/Doxyfile?cvsroot=toon&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/TooN/TODO?cvsroot=toon&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/TooN/doc/documentation.h?cvsroot=toon&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/matrix.hh?cvsroot=toon&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/mbase.hh?cvsroot=toon&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/objects.h?cvsroot=toon&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/vector.hh?cvsroot=toon&r1=1.45&r2=1.46
http://cvs.savannah.gnu.org/viewcvs/TooN/test/diagslice.cc?cvsroot=toon&rev=1.1
Patches:
Index: Doxyfile
===================================================================
RCS file: /cvsroot/toon/TooN/Doxyfile,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- Doxyfile 28 Apr 2009 22:42:36 -0000 1.3
+++ Doxyfile 1 May 2009 09:47:15 -0000 1.4
@@ -133,7 +133,7 @@
# If set to NO, the detailed description appears after the member
# documentation.
-DETAILS_AT_TOP = NO
+#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
@@ -412,7 +412,7 @@
# excluded from the INPUT source files. This way you can easily exclude a
# subdirectory from a directory tree whose root is specified with the INPUT
tag.
-EXCLUDE = wls_cholesky.h lapack.h
+EXCLUDE = wls_cholesky.h lapack.h internal/make_vector.hh
# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
directories
# that are symbolic links (a Unix filesystem feature) are excluded from the
input.
Index: TODO
===================================================================
RCS file: /cvsroot/toon/TooN/TODO,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- TODO 14 Apr 2009 12:57:29 -0000 1.13
+++ TODO 1 May 2009 09:47:16 -0000 1.14
@@ -1,6 +1,5 @@
use BLAS
more complete helpers.h
-fix up SVD, SymEigen
-fix up wls_cholesky, irls?
-fix up downhill_simplex?
+Half dynamic slice?
+fix irls?
iterators
Index: doc/documentation.h
===================================================================
RCS file: /cvsroot/toon/TooN/doc/documentation.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- doc/documentation.h 28 Apr 2009 21:45:46 -0000 1.24
+++ doc/documentation.h 1 May 2009 09:47:16 -0000 1.25
@@ -78,9 +78,9 @@
cvs -z3 -d:pserver:address@hidden:/cvsroot/toon co TooN
- Tom's home page for the library with a version of this documentation is
at:
+ The home page for the library with a version of this documentation is
at:
- http://mi.eng.cam.ac.uk/~twd20/TooN/html/index.html
+ http://mi.eng.cam.ac.uk/~er258/cvd/toon.html
The code will work as-is, and comes with a default configuration, which
should work on any system.
@@ -702,6 +702,5 @@
@defgroup gTooN Main parts of TooN
-
@defgroup gInternal TooN internals
*/
Index: internal/matrix.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/matrix.hh,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- internal/matrix.hh 29 Apr 2009 21:59:44 -0000 1.32
+++ internal/matrix.hh 1 May 2009 09:47:16 -0000 1.33
@@ -164,6 +164,13 @@
return *this;
}
+ template<class Op>
+ Matrix& operator-=(const Operator<Op>& op)
+ {
+ op.minusequals(*this);
+ return *this;
+ }
+
template<int Rows2, int Cols2, typename Precision2, typename Base2>
Matrix& operator-= (const Matrix<Rows2, Cols2, Precision2, Base2>& from)
{
Index: internal/mbase.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/mbase.hh,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- internal/mbase.hh 29 Apr 2009 21:59:14 -0000 1.29
+++ internal/mbase.hh 1 May 2009 09:47:16 -0000 1.30
@@ -55,6 +55,29 @@
};
+template<int Rows, int Cols, bool D = (Rows == Dynamic || Cols == Dynamic)>
+struct DiagSize
+{
+ static const int size = Dynamic;
+};
+template<int Rows, int Cols>
+struct DiagSize<Rows, Cols, 0>
+{
+ static const int size = (Rows<Cols?Rows:Cols);
+};
+
+template<int Rs, int Cs, bool D = (Rs == Dynamic || Cs == Dynamic)>
+struct DiagStride
+{
+ static const int stride = Dynamic;
+};
+template<int Rs, int Cs>
+struct DiagStride<Rs, Cs, 0>
+{
+ static const int stride = Rs + Cs;
+};
+
+
template<int Rows, int Cols, class Precision, int RowStride, int ColStride,
class Mem> struct GenericMBase
: public Mem,
RowStrideHolder<RowStride>,
@@ -169,12 +192,17 @@
const Matrix<Cols, Rows, Precision,
Slice<SliceColStride,SliceRowStride> > T() const{
return Matrix<Cols, Rows, Precision,
Slice<SliceColStride,SliceRowStride> >(const_cast<Precision*>(my_data),
num_cols(), num_rows(), colstride(), rowstride(), Slicing());
}
-};
-
-}
+ static const int DiagSize = Internal::DiagSize<Rows, Cols>::size;
+ static const int DiagStride = Internal::DiagStride<SliceRowStride,
SliceColStride>::stride;
+ Vector<DiagSize, Precision, SliceVBase<DiagStride> > diagonal_slice()
+ {
+ return Vector<DiagSize, Precision, SliceVBase<DiagStride>
>(my_data, std::min(num_cols(), num_rows()), rowstride() + colstride(),
Slicing());
+ }
+};
+}
////////////////////////////////////////////////////////////////////////////////
//
Index: internal/objects.h
===================================================================
RCS file: /cvsroot/toon/TooN/internal/objects.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- internal/objects.h 30 Apr 2009 12:43:03 -0000 1.6
+++ internal/objects.h 1 May 2009 09:47:16 -0000 1.7
@@ -204,6 +204,8 @@
{
return Operator<Internal::Identity<Pout> >(val*m);
}
+
+
};
////////////////////////////////////////////////////////////////////////////////
@@ -317,6 +319,14 @@
}
template <int Rows, int Cols, typename P1, typename B1>
+ void minusequals(Matrix<Rows,Cols, P1, B1>& m) const
+ {
+ for(int r=0; r < m.num_rows(); r++)
+ for(int c=0; c < m.num_cols(); c++)
+ m[r][c] -= s;
+ }
+
+ template <int Rows, int Cols, typename P1, typename B1>
Operator<Internal::ScalarsMatrix<Rows,Cols,P1,B1,Precision> > add(const
Matrix<Rows,Cols, P1, B1>& v) const
{
return
Operator<Internal::ScalarsMatrix<Rows,Cols,P1,B1,Precision> >(s, v);
@@ -423,6 +433,15 @@
{
return l.template scale_me<typename Internal::MultiplyType<Pl,
Pr>::type, Pl>(static_cast<typename Internal::DivideType<Pl,Pr>::type>(1)/r);
}
+
+
+template<class Op, class P>
+Operator<Op> operator-(const Operator<Op>& o)
+{
+ return o.scalar(-1);
+}
+
+
/**This function us used to add a scalar to every element of a vector or
matrix. For example:
@code
Index: internal/vector.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/vector.hh,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- internal/vector.hh 29 Apr 2009 23:02:58 -0000 1.45
+++ internal/vector.hh 1 May 2009 09:47:16 -0000 1.46
@@ -292,6 +292,13 @@
return *this;
}
+ template<class Op>
+ Vector& operator-=(const Operator<Op>& op)
+ {
+ op.minusequals(*this);
+ return *this;
+ }
+
/// subtract another vector from this one
template<int Size2, class Precision2, class Base2>
Vector& operator-=(const Vector<Size2, Precision2, Base2>& rhs) {
Index: test/diagslice.cc
===================================================================
RCS file: test/diagslice.cc
diff -N test/diagslice.cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ test/diagslice.cc 1 May 2009 09:47:16 -0000 1.1
@@ -0,0 +1,35 @@
+#include <TooN/TooN.h>
+#include <cstdlib>
+using namespace TooN;
+using namespace std;
+
+template<int R, int C> void test(int r, int c)
+{
+ Matrix<R,C> m(r,c);
+ for(int r=0; r < m.num_rows(); r++)
+ for(int c=0; c < m.num_cols(); c++)
+ m[r][c] = rand()*.1/RAND_MAX;
+
+ cout << m << endl;
+ cout << "Diag: " << m.diagonal_slice() << endl << endl;
+}
+
+int main()
+{
+ test<3,3>(3,3);
+ test<3,2>(3,2);
+ test<2,3>(2,3);
+
+ test<3,Dynamic>(3,3);
+ test<3,Dynamic>(3,2);
+ test<2,Dynamic>(2,3);
+
+ test<Dynamic,3>(3,3);
+ test<Dynamic,2>(3,2);
+ test<Dynamic,3>(2,3);
+
+
+ test<Dynamic,Dynamic>(3,3);
+ test<Dynamic,Dynamic>(3,2);
+ test<Dynamic,Dynamic>(2,3);
+}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Toon-members] TooN Doxyfile TODO doc/documentation.h internal...,
Edward Rosten <=