Man Page for vtkTensor
Table of Contents

NAME

vtkTensor - supporting class to enable assignment and referencing of tensors

SYNOPSIS


#include "/opt/vtk-c++/common/vtkTensor.h"

class VTK_EXPORT vtkTensor

inline vtkTensor(int dim=3);
static vtkTensor *New() {return new vtkTensor;};
void Initialize();
float GetComponent(int i, int j);
void SetComponent(int i, int j, float v);
void AddComponent(int i, int j, float v);
float *GetColumn(int j);
void operator=(float *t);
void operator=(vtkTensor &t);
operator float*() {return this->T;};
void SetDimension(int dim);
int GetDimension();
float *T;

DESCRIPTION

vtkTensor is a floating point representation of an nxn tensor. vtkTensor provides methods for assignment and reference of tensor components. It does it in such a way as to minimize data copying.

CAVEATS

vtkTensor performs its operations using pointer reference. You are responsible for supplying data storage (if necessary) if local copies of data are being made.

DEFINED MACROS

VTK_TENSOR_MAXDIM 3

SUMMARY

vtkTensor(int dim)
Construct tensor initially pointing to internal storage.

void SetDimension(int dim)
Set the dimensions of the tensor.

int GetDimension()
Get the dimensions of the tensor.

void Initialize()
Initialize tensor components to 0.0.

float GetComponent(int i, int j)
Get the tensor component (i,j).

void SetComponent(int i, int j, float v)
Set the value of the tensor component (i,j).

void AddComponent(int i, int j, float v)
Add to the value of the tensor component at location (i,j).

void operator=(float *t)
Assign tensors to a float array. Float array must be sized Dimension*Dimension.

void operator=(vtkTensor &t)
Assign tensor to another tensor.

float *GetColumn(int j)
Return column vector from tensor. (Assumes 2D matrix form and 0-offset.)


Table of Contents