VTK
vtkDIMACSGraphReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkDIMACSGraphReader.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15/*----------------------------------------------------------------------------
16 Copyright (c) Sandia Corporation
17 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18----------------------------------------------------------------------------*/
19
62#ifndef vtkDIMACSGraphReader_h
63#define vtkDIMACSGraphReader_h
64
65#include "vtkIOInfovisModule.h" // For export macro
66#include "vtkGraphAlgorithm.h"
67#include "vtkStdString.h" // For string API
68
69class VTKIOINFOVIS_EXPORT vtkDIMACSGraphReader : public vtkGraphAlgorithm
70{
71
72public:
73
76 void PrintSelf(ostream& os, vtkIndent indent);
77
79
83 vtkSetStringMacro(FileName);
85
87
90 vtkGetStringMacro(VertexAttributeArrayName);
91 vtkSetStringMacro(VertexAttributeArrayName);
93
95
98 vtkGetStringMacro(EdgeAttributeArrayName);
99 vtkSetStringMacro(EdgeAttributeArrayName);
101
102protected:
103
106
110
112 vtkStdString & defaultVertexAttrArrayName,
113 vtkStdString & defaultEdgeAttrArrayName);
114
117
122 vtkInformationVector** inputVector,
123 vtkInformationVector* outputVector);
124
126
127private:
128
129 bool fileOk;
130 bool Directed;
131 char * FileName;
132 char * VertexAttributeArrayName;
133 char * EdgeAttributeArrayName;
134
135 int numVerts;
136 int numEdges;
137 vtkStdString dimacsProblemStr;
138
139 vtkDIMACSGraphReader(const vtkDIMACSGraphReader&) VTK_DELETE_FUNCTION;
140 void operator=(const vtkDIMACSGraphReader&) VTK_DELETE_FUNCTION;
141};
142
143#endif // vtkDIMACSGraphReader_h
reads vtkGraph data from a DIMACS formatted file
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Creates directed or undirected output based on Directed flag.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
int buildGenericGraph(vtkGraph *output, vtkStdString &defaultVertexAttrArrayName, vtkStdString &defaultEdgeAttrArrayName)
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
int buildColoringGraph(vtkGraph *output)
static vtkDIMACSGraphReader * New()
int buildMaxflowGraph(vtkGraph *output)
Superclass for algorithms that produce only graph as output.
Base class for graph data types.
Definition: vtkGraph.h:288
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:49
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.