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 "vtkArrayDataAlgorithm.h"
40 
42 {
43 public:
44  static vtkDiagonalMatrixSource* New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
48 //BTX
49  // Determines whether the output matrix will be dense or sparse
51  {
53  SPARSE
54  };
55 //ETX
56 
57  vtkGetMacro(ArrayType, int);
58  vtkSetMacro(ArrayType, int);
59 
61 
62  vtkGetMacro(Extents, vtkIdType);
63  vtkSetMacro(Extents, vtkIdType);
65 
67 
69  vtkGetMacro(Diagonal, double);
70  vtkSetMacro(Diagonal, double);
72 
74 
76  vtkGetMacro(SuperDiagonal, double);
77  vtkSetMacro(SuperDiagonal, double);
79 
81 
83  vtkGetMacro(SubDiagonal, double);
84  vtkSetMacro(SubDiagonal, double);
86 
88 
89  vtkGetStringMacro(RowLabel);
90  vtkSetStringMacro(RowLabel);
92 
94 
95  vtkGetStringMacro(ColumnLabel);
96  vtkSetStringMacro(ColumnLabel);
98 
99 protected:
102 
103  int RequestData(
104  vtkInformation*,
107 
108 private:
109  vtkDiagonalMatrixSource(const vtkDiagonalMatrixSource&); // Not implemented
110  void operator=(const vtkDiagonalMatrixSource&); // Not implemented
111 
112  vtkArray* GenerateDenseArray();
113  vtkArray* GenerateSparseArray();
114 
115  int ArrayType;
116  vtkIdType Extents;
117  double Diagonal;
118  double SuperDiagonal;
119  double SubDiagonal;
120  char* RowLabel;
121  char* ColumnLabel;
122 };
123 
124 #endif
125