(liboctave.info)Constructors and Assignment
3.1 Constructors and Assignment
===============================
-- Constructor: Array<T> (void)
Create an array with no elements.
-- Constructor: Array<T> (int N [, const T &VAL])
Create an array with N elements. If the optional argument VAL is
supplied, the elements are initialized to VAL; otherwise, they are
left uninitialized. If N is less than zero, the current error
handler is invoked (Note: Error Handling).
-- Constructor: Array<T> (const Array<T> &A)
Create a copy of the ARRAY<T> object A. Memory for the ARRAY<T>
class is managed using a reference counting scheme, so the cost of
this operation is independent of the size of the array.
-- Assignment on Array<T>: Array<T>& operator = (const Array<T> &A)
Assignment operator. Memory for the ARRAY<T> class is managed
using a reference counting scheme, so the cost of this operation is
independent of the size of the array.
-- Method on Array<T>: int capacity (void) const
-- Method on Array<T>: int length (void) const
Return the length of the array.
-- Method on Array<T>: T& elem (int N)
-- Method on Array<T>: T& checkelem (int N)
If N is within the bounds of the array, return a reference to the
element indexed by N; otherwise, the current error handler is
invoked (Note: Error Handling).
-- Indexing on Array<T>: T& operator () (int N)
-- Method on Array<T>: T elem (int N) const
-- Method on Array<T>: T checkelem (int N) const
If N is within the bounds of the array, return the value indexed by
N; otherwise, call the current error handler. Note: Error
Handling.
-- Indexing on Array<T>: T operator () (int N) const
-- Method on Array<T>: T& xelem (int N)
-- Method on Array<T>: T xelem (int N) const
Return a reference to, or the value of, the element indexed by N.
These methods never perform bounds checking.
-- Method on Array<T>: void resize (int N [, const T &VAL])
Change the size of the array to be N elements. All elements are
unchanged, except that if N is greater than the current size and
the optional argument VAL is provided, the additional elements are
initialized to VAL; otherwise, any additional elements are left
uninitialized. In the current implementation, if N is less than
the current size, the length is updated but no memory is released.
-- Method on Array<T>: const T* data (void) const
-- Constructor: Array2<T> Array2<T> Array2 (void)
-- Constructor: Array2<T> (int N, int M)
-- Constructor: Array2<T> (int N, int M, const T &VAL)
-- Constructor: Array2<T> (const Array2<T> &A)
-- Constructor: Array2<T> (const DiagArray<T> &A)
-- Assignment on Array2<T>: Array2<T>& operator = (const Array2<T> &A)
-- Method on Array2<T>: int dim1 (void) const
-- Method on Array2<T>: int rows (void) const
-- Method on Array2<T>: int dim2 (void) const
-- Method on Array2<T>: int cols (void) const
-- Method on Array2<T>: int columns (void) const
-- Method on Array2<T>: T& elem (int I, int J)
-- Method on Array2<T>: T& checkelem (int I, int J)
-- Indexing on Array2<T>: T& operator () (int I, int J)
-- Method on Array2<T>: void resize (int N, int M)
-- Method on Array2<T>: void resize (int N, int M, const T &VAL)
-- Constructor: Array3<T> (void)
-- Constructor: Array3<T> (int N, int M, int K)
-- Constructor: Array3<T> (int N, int M, int K, const T &VAL)
-- Constructor: Array3<T> (const Array3<T> &A)
-- Assignment on Array3<T>: Array3<T>& operator = (const Array3<T> &A)
-- Method on Array3<T>: int dim1 (void) const
-- Method on Array3<T>: int dim2 (void) const
-- Method on Array3<T>: int dim3 (void) const
-- Method on Array3<T>: T& elem (int I, int J, int K)
-- Method on Array3<T>: T& checkelem (int I, int J, int K)
-- Indexing on Array3<T>: T& operator () (int I, int J, int K)
-- Method on Array3<T>: void resize (int N, int M, int K)
-- Method on Array3<T>: void resize (int N, int M, int K, const T &VAL)
-- Constructor: DiagArray<T> (void)
-- Constructor: DiagArray<T> (int N)
-- Constructor: DiagArray<T> (int N, const T &VAL)
-- Constructor: DiagArray<T> (int R, int C)
-- Constructor: DiagArray<T> (int R, int C, const T &VAL)
-- Constructor: DiagArray<T> (const Array<T> &A)
-- Constructor: DiagArray<T> (const DiagArray<T> &A)
-- Assignment on DiagArray<T>&: operator = (const DiagArray<T> &A)
-- Method on DiagArray<T>: int dim1 (void) const
-- Method on DiagArray<T>: int rows (void) const
-- Method on DiagArray<T>: int dim2 (void) const
-- Method on DiagArray<T>: int cols (void) const
-- Method on DiagArray<T>: int columns (void) const
-- Method on DiagArray<T>: T& elem (int R, int C)
-- Method on DiagArray<T>: T& checkelem (int R, int C)
-- Indexing on DiagArray<T>: T& operator () (int R, int C)
-- Method on DiagArray<T>: void resize (int N, int M)
-- Method on DiagArray<T>: void resize (int N, int M, const T &VAL)
The real and complex 'ColumnVector' and 'RowVector' classes all have
the following functions. These will eventually be part of an
'MArray<T>' class, derived from the 'Array<T>' class. Then the
'ColumnVector' and 'RowVector' classes will be derived from the
'MArray<T>' class.
Element by element vector by scalar ops.
-- : RowVector operator + (const RowVector &A, const double &S)
-- : RowVector operator - (const RowVector &A, const double &S)
-- : RowVector operator * (const RowVector &A, const double &S)
-- : RowVector operator / (const RowVector &A, const double &S)
Element by element scalar by vector ops.
-- : RowVector operator + (const double &S, const RowVector &A)
-- : RowVector operator - (const double &S, const RowVector &A)
-- : RowVector operator * (const double &S, const RowVector &A)
-- : RowVector operator / (const double &S, const RowVector &A)
Element by element vector by vector ops.
-- : RowVector operator + (const RowVector &A, const RowVector &B)
-- : RowVector operator - (const RowVector &A, const RowVector &B)
-- : RowVector product (const RowVector &A, const RowVector &B)
-- : RowVector quotient (const RowVector &A, const RowVector &B)
Unary MArray ops.
-- : RowVector operator - (const RowVector &A)
The 'Matrix' classes share the following functions. These will
eventually be part of an 'MArray2<T>' class, derived from the
'Array2<T>' class. Then the 'Matrix' class will be derived from the
'MArray<T>' class.
Element by element matrix by scalar ops.
-- : Matrix operator + (const Matrix &A, const double &S)
-- : Matrix operator - (const Matrix &A, const double &S)
-- : Matrix operator * (const Matrix &A, const double &S)
-- : Matrix operator / (const Matrix &A, const double &S)
Element by element scalar by matrix ops.
-- : Matrix operator + (const double &S, const Matrix &A)
-- : Matrix operator - (const double &S, const Matrix &A)
-- : Matrix operator * (const double &S, const Matrix &A)
-- : Matrix operator / (const double &S, const Matrix &A)
Element by element matrix by matrix ops.
-- : Matrix operator + (const Matrix &A, const Matrix &B)
-- : Matrix operator - (const Matrix &A, const Matrix &B)
-- : Matrix product (const Matrix &A, const Matrix &B)
-- : Matrix quotient (const Matrix &A, const Matrix &B)
Unary matrix ops.
-- : Matrix operator - (const Matrix &A)
The 'DiagMatrix' classes share the following functions. These will
eventually be part of an 'MDiagArray<T>' class, derived from the
'DiagArray<T>' class. Then the 'DiagMatrix' class will be derived from
the 'MDiagArray<T>' class.
Element by element MDiagArray by scalar ops.
-- : DiagMatrix operator * (const DiagMatrix &A, const double &S)
-- : DiagMatrix operator / (const DiagMatrix &A, const double &S)
Element by element scalar by MDiagArray ops.
-- : DiagMatrix operator * (const double &S, const DiagMatrix &A)
Element by element MDiagArray by MDiagArray ops.
-- : DiagMatrix operator + (const DiagMatrix &A, const DiagMatrix &B)
-- : DiagMatrix operator - (const DiagMatrix &A, const DiagMatrix &B)
-- : DiagMatrix product (const DiagMatrix &A, const DiagMatrix &B)
Unary MDiagArray ops.
-- : DiagMatrix operator - (const DiagMatrix &A)
automatically generated by info2www version 1.2.2.9