VTK
vtkDiagonalMatrixSource.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkDiagonalMatrixSource.h
5
6-------------------------------------------------------------------------
7 Copyright 2008 Sandia Corporation.
8 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 the U.S. Government retains certain rights in this software.
10-------------------------------------------------------------------------
11
12 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
13 All rights reserved.
14 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
15
16 This software is distributed WITHOUT ANY WARRANTY; without even
17 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18 PURPOSE. See the above copyright notice for more information.
19
20=========================================================================*/
21
37#ifndef vtkDiagonalMatrixSource_h
38#define vtkDiagonalMatrixSource_h
39
40#include "vtkFiltersSourcesModule.h" // For export macro
42
43class VTKFILTERSSOURCES_EXPORT vtkDiagonalMatrixSource : public vtkArrayDataAlgorithm
44{
45public:
48 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
49
50 // Determines whether the output matrix will be dense or sparse
52 {
54 SPARSE
55 };
56
57 vtkGetMacro(ArrayType, int);
58 vtkSetMacro(ArrayType, int);
59
61
64 vtkGetMacro(Extents, vtkIdType);
67
69
72 vtkGetMacro(Diagonal, double);
73 vtkSetMacro(Diagonal, double);
75
77
80 vtkGetMacro(SuperDiagonal, double);
81 vtkSetMacro(SuperDiagonal, double);
83
85
88 vtkGetMacro(SubDiagonal, double);
89 vtkSetMacro(SubDiagonal, double);
91
93
98 vtkSetStringMacro(RowLabel);
100
102
106 vtkGetStringMacro(ColumnLabel);
107 vtkSetStringMacro(ColumnLabel);
109
110protected:
113
114 int RequestData(
117 vtkInformationVector*) VTK_OVERRIDE;
118
119private:
120 vtkDiagonalMatrixSource(const vtkDiagonalMatrixSource&) VTK_DELETE_FUNCTION;
121 void operator=(const vtkDiagonalMatrixSource&) VTK_DELETE_FUNCTION;
122
123 vtkArray* GenerateDenseArray();
124 vtkArray* GenerateSparseArray();
125
126 int ArrayType;
127 vtkIdType Extents;
128 double Diagonal;
129 double SuperDiagonal;
130 double SubDiagonal;
131 char* RowLabel;
132 char* ColumnLabel;
133};
134
135#endif
136
Superclass for algorithms that produce vtkArrayDatas as output.
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:71
generates a sparse or dense square matrix with user-specified values for the diagonal,...
static vtkDiagonalMatrixSource * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkDiagonalMatrixSource() override
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
int vtkIdType
Definition: vtkType.h:287