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

A vector with non-linear data access. More...

#include <vector.hpp>

Inheritance diagram for ngbla::SliceVector< T >:
ngbla::CMCPMatExpr< SliceVector< T > > ngbla::MatExpr< SliceVector< T > > ngbla::Expr< SliceVector< T > >

List of all members.

Public Types

enum  { IS_LINEAR = 0 }
 element access is not linear
typedef T TELEM
 the entry type
typedef mat_traits< T >::TSCAL TSCAL
 the scalar type of the vector

Public Member Functions

 SliceVector (unsigned int as, unsigned int ad, T *adata)
 set size, distance and memory
template<typename TB >
const SliceVectoroperator= (const Expr< TB > &v) const
 evaluates matrix expression
const SliceVectoroperator= (TSCAL scal) const
 assignes constant value
const SliceVectoroperator= (const SliceVector &v2) const
 copies contents of vector
template<typename TB >
const SliceVectoroperator+= (const Expr< TB > &v) const
TELEMoperator() (int i)
 access element
TELEMoperator() (int i) const
 access element
TELEMoperator() (int i, int j) const
 access element, index j is unused
TELEMoperator() (int i, int j)
 access element, index j is unused
TELEMoperator[] (int i)
 access element
TELEMoperator[] (int i) const
 access element
TELEMAddr (int i) const
int Size () const
 vector size
int Height () const
 vector is a matrix of hight size
int Width () const
 vector is a matrix of width 1
const SliceVector< T > Range (int first, int next) const
const SliceVector< T > Range (IntRange range) const
const SliceVector< T > Slice (int first, int adist) const

Protected Attributes

int s
 vector size
int dist
 distance between entries
T * data
 the data

Detailed Description

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

A vector with non-linear data access.

Has size and generic data-pointer. No memory allocation/deallocation. User must provide memory.


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