VTK
dox/Infovis/vtkRandomGraphSource.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkRandomGraphSource.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00037 #ifndef __vtkRandomGraphSource_h
00038 #define __vtkRandomGraphSource_h
00039 
00040 #include "vtkGraphAlgorithm.h"
00041 
00042 class vtkGraph;
00043 class vtkPVXMLElement;
00044 
00045 class VTK_INFOVIS_EXPORT vtkRandomGraphSource : public vtkGraphAlgorithm
00046 {
00047 public:
00048   static vtkRandomGraphSource* New();
00049   vtkTypeMacro(vtkRandomGraphSource,vtkGraphAlgorithm);
00050   void PrintSelf(ostream& os, vtkIndent indent);
00051 
00053 
00054   vtkGetMacro(NumberOfVertices, int);
00055   vtkSetClampMacro(NumberOfVertices, int, 0, VTK_INT_MAX);
00057 
00059 
00061   vtkGetMacro(NumberOfEdges, int);
00062   vtkSetClampMacro(NumberOfEdges, int, 0, VTK_INT_MAX);
00064 
00066 
00068   vtkGetMacro(EdgeProbability, double);
00069   vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
00071 
00073 
00075   vtkSetMacro(IncludeEdgeWeights, bool);
00076   vtkGetMacro(IncludeEdgeWeights, bool);
00077   vtkBooleanMacro(IncludeEdgeWeights, bool);
00079 
00081 
00082   vtkSetStringMacro(EdgeWeightArrayName);
00083   vtkGetStringMacro(EdgeWeightArrayName);
00085 
00087 
00089   vtkSetMacro(Directed, bool);
00090   vtkGetMacro(Directed, bool);
00091   vtkBooleanMacro(Directed, bool);
00093 
00095 
00097   vtkSetMacro(UseEdgeProbability, bool);
00098   vtkGetMacro(UseEdgeProbability, bool);
00099   vtkBooleanMacro(UseEdgeProbability, bool);
00101 
00103 
00105   vtkSetMacro(StartWithTree, bool);
00106   vtkGetMacro(StartWithTree, bool);
00107   vtkBooleanMacro(StartWithTree, bool);
00109 
00111 
00113   vtkSetMacro(AllowSelfLoops, bool);
00114   vtkGetMacro(AllowSelfLoops, bool);
00115   vtkBooleanMacro(AllowSelfLoops, bool);
00117 
00119 
00121   vtkSetMacro(AllowParallelEdges, bool);
00122   vtkGetMacro(AllowParallelEdges, bool);
00123   vtkBooleanMacro(AllowParallelEdges, bool);
00125 
00127 
00128   vtkSetMacro(GeneratePedigreeIds, bool);
00129   vtkGetMacro(GeneratePedigreeIds, bool);
00130   vtkBooleanMacro(GeneratePedigreeIds, bool);
00132 
00134 
00135   vtkSetStringMacro(VertexPedigreeIdArrayName);
00136   vtkGetStringMacro(VertexPedigreeIdArrayName);
00138 
00140 
00141   vtkSetStringMacro(EdgePedigreeIdArrayName);
00142   vtkGetStringMacro(EdgePedigreeIdArrayName);
00144 
00146 
00148   vtkSetMacro(Seed, int);
00149   vtkGetMacro(Seed, int);
00151 
00152 protected:
00153   vtkRandomGraphSource();
00154   ~vtkRandomGraphSource();
00155   int NumberOfVertices;
00156   int NumberOfEdges;
00157   double EdgeProbability;
00158   bool Directed;
00159   bool UseEdgeProbability;
00160   bool StartWithTree;
00161   bool IncludeEdgeWeights;
00162   bool AllowSelfLoops;
00163   bool AllowParallelEdges;
00164   bool GeneratePedigreeIds;
00165   int Seed;
00166   char* EdgeWeightArrayName;
00167   char* VertexPedigreeIdArrayName;
00168   char* EdgePedigreeIdArrayName;
00169 
00170   virtual int RequestData(
00171     vtkInformation*, 
00172     vtkInformationVector**, 
00173     vtkInformationVector*);
00174 
00176 
00177   virtual int RequestDataObject(vtkInformation*, 
00178                                 vtkInformationVector** inputVector, 
00179                                 vtkInformationVector* outputVector);
00181 
00182 private:
00183   vtkRandomGraphSource(const vtkRandomGraphSource&); // Not implemented
00184   void operator=(const vtkRandomGraphSource&);   // Not implemented
00185 };
00186 
00187 #endif
00188