VMTK
Loading...
Searching...
No Matches
vtkvmtkSparseMatrixRow.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: VMTK
4
5 Copyright (c) Luca Antiga, David Steinman. All rights reserved.
6 See LICENSE file for details.
7
8 Portions of this code are covered under the VTK copyright.
9 See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
10 for details.
11
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
15
16=========================================================================*/
32
33#ifndef __vtkvmtkSparseMatrixRow_h
34#define __vtkvmtkSparseMatrixRow_h
35
36#include "vtkObject.h"
37#include "vtkvmtkStencil.h"
38#include "vtkvmtkNeighborhood.h"
39#include "vtkvmtkConstants.h"
40#include "vtkvmtkWin32Header.h"
41
42class VTK_VMTK_DIFFERENTIAL_GEOMETRY_EXPORT vtkvmtkSparseMatrixRow : public vtkObject
43{
44public:
45
47 vtkTypeMacro(vtkvmtkSparseMatrixRow,vtkObject);
48
50
54 vtkIdType GetElementId(vtkIdType i) { return this->ElementIds[i]; }
55 void SetElementId(vtkIdType i, vtkIdType id) { this->ElementIds[i] = id; }
57
59
63 double GetElement(vtkIdType i) { return this->Elements[i]; }
64 void SetElement(vtkIdType i, double element) { this->Elements[i] = element; }
66
71 vtkIdType GetElementIndex(vtkIdType id);
72
74
79 vtkIdType GetNumberOfElements() { return this->NElements; }
80 void SetNumberOfElements(vtkIdType numberOfElements);
82
84
88 vtkSetMacro(DiagonalElement,double);
89 vtkGetMacro(DiagonalElement,double);
91
96 void Initialize();
97
103 void CopyStencil(vtkvmtkStencil* stencil);
104
109 void CopyNeighborhood(vtkvmtkNeighborhood* neighborhood);
110
116
117protected:
120
121 vtkIdType* ElementIds;
122 double* Elements;
124 vtkIdType NElements;
125
126private:
127 vtkvmtkSparseMatrixRow(const vtkvmtkSparseMatrixRow&); // Not implemented.
128 void operator=(const vtkvmtkSparseMatrixRow&); // Not implemented.
129};
130
131#endif
132
Query the neighborhood surrounding the set point id in an data set item.
void CopyStencil(vtkvmtkStencil *stencil)
void DeepCopy(vtkvmtkSparseMatrixRow *src)
void SetElement(vtkIdType i, double element)
void SetElementId(vtkIdType i, vtkIdType id)
void CopyNeighborhood(vtkvmtkNeighborhood *neighborhood)
static vtkvmtkSparseMatrixRow * New()
double GetElement(vtkIdType i)
vtkIdType GetElementId(vtkIdType i)
Serves as an abstract base for a weighting scheme applied to a single point's neighborhood of a data ...