VTK
dox/Infovis/vtkDiagonalMatrixSource.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkDiagonalMatrixSource.h
00005   
00006 -------------------------------------------------------------------------
00007   Copyright 2008 Sandia Corporation.
00008   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00009   the U.S. Government retains certain rights in this software.
00010 -------------------------------------------------------------------------
00011 
00012   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00013   All rights reserved.
00014   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00015 
00016      This software is distributed WITHOUT ANY WARRANTY; without even
00017      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00018      PURPOSE.  See the above copyright notice for more information.
00019 
00020 =========================================================================*/
00021 
00036 #ifndef __vtkDiagonalMatrixSource_h
00037 #define __vtkDiagonalMatrixSource_h
00038 
00039 #include "vtkArrayDataAlgorithm.h"
00040 
00041 class VTK_INFOVIS_EXPORT vtkDiagonalMatrixSource : public vtkArrayDataAlgorithm
00042 {
00043 public:
00044   static vtkDiagonalMatrixSource* New();
00045   vtkTypeMacro(vtkDiagonalMatrixSource, vtkArrayDataAlgorithm);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047 
00048 //BTX
00049   // Determines whether the output matrix will be dense or sparse
00050   enum StorageType
00051   {
00052     DENSE,
00053     SPARSE
00054   };
00055 //ETX
00056 
00057   vtkGetMacro(ArrayType, int);
00058   vtkSetMacro(ArrayType, int);
00059 
00061 
00062   vtkGetMacro(Extents, vtkIdType);
00063   vtkSetMacro(Extents, vtkIdType);
00065 
00067 
00069   vtkGetMacro(Diagonal, double);
00070   vtkSetMacro(Diagonal, double);
00072 
00074 
00076   vtkGetMacro(SuperDiagonal, double);
00077   vtkSetMacro(SuperDiagonal, double);
00079 
00081 
00083   vtkGetMacro(SubDiagonal, double);
00084   vtkSetMacro(SubDiagonal, double);
00086 
00088 
00089   vtkGetStringMacro(RowLabel);
00090   vtkSetStringMacro(RowLabel);
00092 
00094 
00095   vtkGetStringMacro(ColumnLabel);
00096   vtkSetStringMacro(ColumnLabel);
00098 
00099 protected:
00100   vtkDiagonalMatrixSource();
00101   ~vtkDiagonalMatrixSource();
00102 
00103   int RequestData(
00104     vtkInformation*, 
00105     vtkInformationVector**, 
00106     vtkInformationVector*);
00107 
00108 private:
00109   vtkDiagonalMatrixSource(const vtkDiagonalMatrixSource&); // Not implemented
00110   void operator=(const vtkDiagonalMatrixSource&);   // Not implemented
00111 
00112   vtkArray* GenerateDenseArray();
00113   vtkArray* GenerateSparseArray();
00114 
00115   int ArrayType;
00116   vtkIdType Extents;
00117   double Diagonal;
00118   double SuperDiagonal;
00119   double SubDiagonal;
00120   char* RowLabel;
00121   char* ColumnLabel;
00122 };
00123 
00124 #endif
00125