changeset 9656:b29504415a2e

provide NDArray->Matrix->Vector typedef mappers
author Jaroslav Hajek <highegg@gmail.com>
date Sat, 19 Sep 2009 11:14:28 +0200
parents 17971b0f18b1
children 3c1c3a38ec7b
files liboctave/CMatrix.h liboctave/CNDArray.h liboctave/ChangeLog liboctave/boolNDArray.h liboctave/chNDArray.h liboctave/dMatrix.h liboctave/dNDArray.h liboctave/fCMatrix.h liboctave/fCNDArray.h liboctave/fMatrix.h liboctave/fNDArray.h
diffstat 11 files changed, 42 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/CMatrix.h	Fri Sep 18 18:57:39 2009 -0400
+++ b/liboctave/CMatrix.h	Sat Sep 19 11:14:28 2009 +0200
@@ -39,6 +39,9 @@
 {
 public:
  
+  typedef ComplexColumnVector column_vector_type;
+  typedef ComplexRowVector row_vector_type;
+
   typedef void (*solve_singularity_handler) (double rcon);
 
   ComplexMatrix (void) : MArray2<Complex> () { }
--- a/liboctave/CNDArray.h	Fri Sep 18 18:57:39 2009 -0400
+++ b/liboctave/CNDArray.h	Sat Sep 19 11:14:28 2009 +0200
@@ -35,6 +35,8 @@
 {
 public:
 
+  typedef ComplexMatrix matrix_type;
+
   ComplexNDArray (void) : MArrayN<Complex> () { }
 
   ComplexNDArray (const dim_vector& dv) : MArrayN<Complex> (dv) { }
--- a/liboctave/ChangeLog	Fri Sep 18 18:57:39 2009 -0400
+++ b/liboctave/ChangeLog	Sat Sep 19 11:14:28 2009 +0200
@@ -1,3 +1,21 @@
+2009-09-19  Jaroslav Hajek  <highegg@gmail.com>
+
+	* dNDArray.h (NDArray::matrix_type): New typedef.
+	* fNDArray.h (FloatNDArray::matrix_type): New typedef.
+	* CNDArray.h (ComplexNDArray::matrix_type): New typedef.
+	* fCNDArray.h (FloatComplexNDArray::matrix_type): New typedef.
+	* boolNDArray.h (boolNDArray::matrix_type): New typedef.
+	* charNDArray.h (charNDArray::matrix_type): New typedef.
+
+	* dMatrix.h (Matrix::column_vector_type, 
+	Matrix::row_vector_type): New typedefs.
+	* fMatrix.h (FloatMatrix::column_vector_type,
+	FloatMatrix::row_vector_type): New typedefs.
+	* CMatrix.h (ComplexMatrix::column_vector_type,
+	ComplexMatrix::row_vector_type): New typedefs.
+	* fCMatrix.h (FloatComplexMatrix::column_vector_type,
+	FloatComplexMatrix::row_vector_type): New typedefs.
+
 2009-09-18  John W. Eaton  <jwe@octave.org>
 
 	* mach-info.cc: Don't include oct-types.h.
--- a/liboctave/boolNDArray.h	Fri Sep 18 18:57:39 2009 -0400
+++ b/liboctave/boolNDArray.h	Sat Sep 19 11:14:28 2009 +0200
@@ -36,6 +36,8 @@
 {
 public:
 
+  typedef boolMatrix matrix_type;
+
   boolNDArray (void) : ArrayN<bool> () { }
 
   boolNDArray (const dim_vector& dv) : ArrayN<bool> (dv) { }
--- a/liboctave/chNDArray.h	Fri Sep 18 18:57:39 2009 -0400
+++ b/liboctave/chNDArray.h	Sat Sep 19 11:14:28 2009 +0200
@@ -35,6 +35,8 @@
 {
 public:
 
+  typedef charMatrix matrix_type;
+
   charNDArray (void) : MArrayN<char> () { }
 
   charNDArray (const dim_vector& dv) : MArrayN<char> (dv) { }
--- a/liboctave/dMatrix.h	Fri Sep 18 18:57:39 2009 -0400
+++ b/liboctave/dMatrix.h	Sat Sep 19 11:14:28 2009 +0200
@@ -38,6 +38,9 @@
 {
 public:
 
+  typedef ColumnVector column_vector_type;
+  typedef RowVector row_vector_type;
+
   typedef void (*solve_singularity_handler) (double rcon);
 
   Matrix (void) : MArray2<double> () { }
--- a/liboctave/dNDArray.h	Fri Sep 18 18:57:39 2009 -0400
+++ b/liboctave/dNDArray.h	Sat Sep 19 11:14:28 2009 +0200
@@ -37,6 +37,8 @@
 {
 public:
 
+  typedef Matrix matrix_type;
+
   NDArray (void) : MArrayN<double> () { }
 
   NDArray (const dim_vector& dv) : MArrayN<double> (dv) { }
--- a/liboctave/fCMatrix.h	Fri Sep 18 18:57:39 2009 -0400
+++ b/liboctave/fCMatrix.h	Sat Sep 19 11:14:28 2009 +0200
@@ -39,6 +39,9 @@
 {
 public:
  
+  typedef FloatComplexColumnVector column_vector_type;
+  typedef FloatComplexRowVector row_vector_type;
+
   typedef void (*solve_singularity_handler) (float rcon);
 
   FloatComplexMatrix (void) : MArray2<FloatComplex> () { }
--- a/liboctave/fCNDArray.h	Fri Sep 18 18:57:39 2009 -0400
+++ b/liboctave/fCNDArray.h	Sat Sep 19 11:14:28 2009 +0200
@@ -35,6 +35,8 @@
 {
 public:
 
+  typedef FloatComplexMatrix matrix_type;
+
   FloatComplexNDArray (void) : MArrayN<FloatComplex> () { }
 
   FloatComplexNDArray (const dim_vector& dv) : MArrayN<FloatComplex> (dv) { }
--- a/liboctave/fMatrix.h	Fri Sep 18 18:57:39 2009 -0400
+++ b/liboctave/fMatrix.h	Sat Sep 19 11:14:28 2009 +0200
@@ -38,6 +38,9 @@
 {
 public:
 
+  typedef FloatColumnVector column_vector_type;
+  typedef FloatRowVector row_vector_type;
+
   typedef void (*solve_singularity_handler) (float rcon);
 
   FloatMatrix (void) : MArray2<float> () { }
--- a/liboctave/fNDArray.h	Fri Sep 18 18:57:39 2009 -0400
+++ b/liboctave/fNDArray.h	Sat Sep 19 11:14:28 2009 +0200
@@ -37,6 +37,8 @@
 {
 public:
 
+  typedef FloatMatrix matrix_type;
+
   FloatNDArray (void) : MArrayN<float> () { }
 
   FloatNDArray (const dim_vector& dv) : MArrayN<float> (dv) { }