NGSolve  4.9
Public Types | Public Member Functions | Protected Attributes
ngbla::FlatMatrix< T > Class Template Reference

A simple matrix. More...

#include <matrix.hpp>

Inheritance diagram for ngbla::FlatMatrix< T >:
ngbla::CMCPMatExpr< FlatMatrix< T > > ngbla::MatExpr< FlatMatrix< T > > ngbla::Expr< FlatMatrix< T > > ngbla::Matrix< T >

List of all members.

Public Types

typedef T TELEM
 element type
typedef T & TREF
typedef mat_traits< T >::TSCAL TSCAL
 scalar type of elements (double or Complex)

Public Member Functions

 FlatMatrix () throw ()
 nothing done in default constructor
 FlatMatrix (int ah, int aw, T *adata) throw ()
 set height, width, and mem
 FlatMatrix (int ah, T *adata) throw ()
 set height = width, and mem
 FlatMatrix (int ah, int aw, LocalHeap &lh)
 allocates at local heap
 FlatMatrix (int ah, LocalHeap &lh)
 allocates at local heap
 FlatMatrix (const FlatMatrix &m) throw ()
 copy constructor. copies pointers, not contents
template<typename TB >
 FlatMatrix (const LocalHeapExpr< TB > &m2)
 allocate and compute
template<typename T2 >
 FlatMatrix (const MatExpr< T2 > &m)
 useful to put FlatMatrix over other matrix
template<int H, int W>
 FlatMatrix (const Mat< H, W, TSCAL > &m) throw ()
 useful to put FlatMatrix over other Mat
 ~FlatMatrix () throw ()
 do nothing
void AssignMemory (int ah, int aw, LocalHeap &lh)
 set size, and assign mem
void AssignMemory (int ah, int aw, T *mem) throw ()
 set size, and assign mem
template<typename TBxx >
const FlatMatrixoperator= (const Expr< TBxx > &m) const
 assign contents
const FlatMatrixoperator= (const FlatMatrix &m) throw ()
 copy contents
FlatMatrixoperator= (TSCAL s) throw ()
 assign constant
FlatMatrixAssign (const FlatMatrix &m) throw ()
 copy size and pointers
TELEMoperator() (int i) const
 access operator, linear access
TELEMoperator() (int i, int j) const
 access operator
int Height () const throw ()
 the height
int Width () const throw ()
 the width
const FlatVector< T > Row (int i) const
const SliceVector< T > Col (int i) const
const SliceVector< T > Diag () const
const FlatMatrix Rows (int first, int next) const
const SliceMatrix< T > Cols (int first, int next) const
const FlatMatrix Rows (IntRange range) const
const SliceMatrix< T > Cols (IntRange range) const

Protected Attributes

int h
 the height
int w
 the width
T * data
 the data

Detailed Description

template<typename T = double>
class ngbla::FlatMatrix< T >

A simple matrix.

Has height, width and data-pointer. No memory allocation/deallocation. User must provide memory.


The documentation for this class was generated from the following file: