Diff of /src/fixedColVector.h [cbc0a5] .. [53b1fd]  Maximize  Restore

Switch to side-by-side view

--- a/src/fixedColVector.h
+++ b/src/fixedColVector.h
@@ -50,7 +50,8 @@
 
   FixedColumnVector (void) : MArray<FixedPoint> () { }
 
-  explicit FixedColumnVector (int n) : MArray<FixedPoint> (n) { }
+  explicit FixedColumnVector (int n)
+    : MArray<FixedPoint> (dim_vector (n, 1)) { }
 
   FixedColumnVector (const MArray<int> &is, const MArray<int> &ds);
 
@@ -82,7 +83,8 @@
   FixedColumnVector (const ColumnVector &is, const ColumnVector &ds, 
 		  const ColumnVector& a, const ColumnVector& b);
 
-  FixedColumnVector (int n, FixedPoint val) : MArray<FixedPoint> (n, val) { }
+  FixedColumnVector (int n, FixedPoint val)
+    : MArray<FixedPoint> (dim_vector (n,1), val) { }
 
   FixedColumnVector (const FixedColumnVector& a) : MArray<FixedPoint> (a) { }
 
@@ -140,7 +142,8 @@
   FixedPoint min (void) const;
   FixedPoint max (void) const;
 
-  friend FixedColumnVector operator * (const FixedMatrix& a, const FixedColumnVector& b);
+  friend FixedColumnVector operator * (const FixedMatrix& a,
+                                       const FixedColumnVector& b);
 
   friend FixedColumnVector real (const FixedColumnVector &x);
   friend FixedColumnVector imag (const FixedColumnVector &x);
@@ -174,15 +177,21 @@
 
   // i/o
 
-  friend std::ostream& operator << (std::ostream& os, const FixedColumnVector& a);
-  friend std::istream& operator >> (std::istream& is, FixedColumnVector& a);
-
-private:
-
-  FixedColumnVector (FixedPoint *d, int l) : MArray<FixedPoint> (d, l) { }
+  friend std::ostream& operator << (std::ostream& os,
+                                    const FixedColumnVector& a);
+  friend std::istream& operator >> (std::istream& is,
+                                    FixedColumnVector& a);
+
+  void resize (octave_idx_type n,
+               const FixedPoint& rfv = Array<FixedPoint>::resize_fill_value ())
+  {
+    Array<FixedPoint>::resize (dim_vector (n, 1), rfv);
+  }
+
 };
 
-FixedColumnVector operator * (const FixedMatrix& a, const FixedColumnVector& b);
+FixedColumnVector operator * (const FixedMatrix& a,
+                              const FixedColumnVector& b);
 
 FixedColumnVector real (const FixedColumnVector &x);
 FixedColumnVector imag (const FixedColumnVector &x);

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks