VTK
dox/Parallel/vtkPBGLRandomGraphSource.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPBGLRandomGraphSource.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 -------------------------------------------------------------------------*/
00040 #ifndef __vtkPBGLRandomGraphSource_h
00041 #define __vtkPBGLRandomGraphSource_h
00042 
00043 #include "vtkGraphAlgorithm.h"
00044 
00045 class vtkGraph;
00046 class vtkPVXMLElement;
00047 
00048 class VTK_PARALLEL_EXPORT vtkPBGLRandomGraphSource : public vtkGraphAlgorithm
00049 {
00050 public:
00051   static vtkPBGLRandomGraphSource* New();
00052   vtkTypeMacro(vtkPBGLRandomGraphSource,vtkGraphAlgorithm);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00056 
00057   vtkGetMacro(NumberOfVertices, vtkIdType);
00058   vtkSetClampMacro(NumberOfVertices, vtkIdType, 0, VTK_LARGE_ID);
00060 
00062 
00064   vtkGetMacro(NumberOfEdges, vtkIdType);
00065   vtkSetClampMacro(NumberOfEdges, vtkIdType, 0, VTK_LARGE_ID);
00067 
00069 
00071   vtkGetMacro(EdgeProbability, double);
00072   vtkSetClampMacro(EdgeProbability, double, 0.0, 1.0);
00074 
00076 
00078   vtkSetMacro(IncludeEdgeWeights, bool);
00079   vtkGetMacro(IncludeEdgeWeights, bool);
00080   vtkBooleanMacro(IncludeEdgeWeights, bool);
00082 
00084 
00085   vtkSetStringMacro(EdgeWeightArrayName);
00086   vtkGetStringMacro(EdgeWeightArrayName);
00088 
00090 
00092   vtkSetMacro(Directed, bool);
00093   vtkGetMacro(Directed, bool);
00094   vtkBooleanMacro(Directed, bool);
00096 
00098 
00104   vtkSetMacro(UseEdgeProbability, bool);
00105   vtkGetMacro(UseEdgeProbability, bool);
00106   vtkBooleanMacro(UseEdgeProbability, bool);
00108 
00110 
00112   vtkSetMacro(StartWithTree, bool);
00113   vtkGetMacro(StartWithTree, bool);
00114   vtkBooleanMacro(StartWithTree, bool);
00116 
00118 
00120   vtkSetMacro(AllowSelfLoops, bool);
00121   vtkGetMacro(AllowSelfLoops, bool);
00122   vtkBooleanMacro(AllowSelfLoops, bool);
00124 
00126 
00131   vtkSetMacro(AllowBalancedEdgeDistribution, bool);
00132   vtkGetMacro(AllowBalancedEdgeDistribution, bool);
00133   vtkBooleanMacro(AllowBalancedEdgeDistribution, bool);
00135 
00137 
00138   vtkSetMacro(GeneratePedigreeIds, bool);
00139   vtkGetMacro(GeneratePedigreeIds, bool);
00140   vtkBooleanMacro(GeneratePedigreeIds, bool);
00142 
00144 
00146   vtkSetStringMacro(VertexPedigreeIdArrayName);
00147   vtkGetStringMacro(VertexPedigreeIdArrayName);
00149 
00151 
00152   vtkSetStringMacro(EdgePedigreeIdArrayName);
00153   vtkGetStringMacro(EdgePedigreeIdArrayName);
00155 
00157 
00160   vtkSetMacro(Seed, int);
00161   vtkGetMacro(Seed, int);
00163 
00164 protected:
00165   vtkPBGLRandomGraphSource();
00166   ~vtkPBGLRandomGraphSource();
00167   vtkIdType NumberOfVertices;
00168   vtkIdType NumberOfEdges;
00169   double EdgeProbability;
00170   bool Directed;
00171   bool UseEdgeProbability;
00172   bool StartWithTree;
00173   bool IncludeEdgeWeights;
00174   bool AllowSelfLoops;
00175   bool AllowBalancedEdgeDistribution;
00176   bool GeneratePedigreeIds;
00177   int Seed;
00178   char* EdgeWeightArrayName;
00179   char* VertexPedigreeIdArrayName;
00180   char* EdgePedigreeIdArrayName;
00181 
00182   virtual int RequestData(
00183     vtkInformation*,
00184     vtkInformationVector**,
00185     vtkInformationVector*);
00186 
00188 
00189   virtual int RequestDataObject(vtkInformation*,
00190                                 vtkInformationVector** inputVector,
00191                                 vtkInformationVector* outputVector);
00193 
00194 private:
00195   vtkPBGLRandomGraphSource(const vtkPBGLRandomGraphSource&); // Not implemented
00196   void operator=(const vtkPBGLRandomGraphSource&);   // Not implemented
00197 };
00198 
00199 #endif
00200