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 
36 #ifndef vtkDiagonalMatrixSource_h
37 #define vtkDiagonalMatrixSource_h
38 
39 #include "vtkFiltersSourcesModule.h" // For export macro
40 #include "vtkArrayDataAlgorithm.h"
41 
43 {
44 public:
45  static vtkDiagonalMatrixSource* New();
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
49 //BTX
50  // Determines whether the output matrix will be dense or sparse
52  {
54  SPARSE
55  };
56 //ETX
57 
58  vtkGetMacro(ArrayType, int);
59  vtkSetMacro(ArrayType, int);
60 
62 
63  vtkGetMacro(Extents, vtkIdType);
64  vtkSetMacro(Extents, vtkIdType);
66 
68 
70  vtkGetMacro(Diagonal, double);
71  vtkSetMacro(Diagonal, double);
73 
75 
77  vtkGetMacro(SuperDiagonal, double);
78  vtkSetMacro(SuperDiagonal, double);
80 
82 
84  vtkGetMacro(SubDiagonal, double);
85  vtkSetMacro(SubDiagonal, double);
87 
89 
90  vtkGetStringMacro(RowLabel);
91  vtkSetStringMacro(RowLabel);
93 
95 
96  vtkGetStringMacro(ColumnLabel);
97  vtkSetStringMacro(ColumnLabel);
99 
100 protected:
103 
104  int RequestData(
108 
109 private:
110  vtkDiagonalMatrixSource(const vtkDiagonalMatrixSource&); // Not implemented
111  void operator=(const vtkDiagonalMatrixSource&); // Not implemented
112 
113  vtkArray* GenerateDenseArray();
114  vtkArray* GenerateSparseArray();
115 
116  int ArrayType;
117  vtkIdType Extents;
118  double Diagonal;
119  double SuperDiagonal;
120  double SubDiagonal;
121  char* RowLabel;
122  char* ColumnLabel;
123 };
124 
125 #endif
126 
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store vtkAlgorithm input/output information.
Abstract interface for N-dimensional arrays.
Definition: vtkArray.h:69
int vtkIdType
Definition: vtkType.h:275
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKFILTERSSOURCES_EXPORT
Superclass for algorithms that produce vtkArrayDatas as output.
generates a sparse or dense square matrix with user-specified values for the diagonal, superdiagonal, and subdiagonal.
static vtkArrayDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Store zero or more vtkInformation instances.