VTK
dox/Parallel/vtkPBGLRMATGraphSource.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPBGLRMATGraphSource.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 -------------------------------------------------------------------------*/
00020 /* 
00021  * Copyright (C) 2008 The Trustees of Indiana University.
00022  * Use, modification and distribution is subject to the Boost Software
00023  * License, Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt)
00024  */
00067 #ifndef __vtkPBGLRMATGraphSource_h
00068 #define __vtkPBGLRMATGraphSource_h
00069 
00070 #include "vtkGraphAlgorithm.h"
00071 
00072 class vtkGraph;
00073 class vtkPVXMLElement;
00074 
00075 class VTK_PARALLEL_EXPORT vtkPBGLRMATGraphSource : public vtkGraphAlgorithm
00076 {
00077 public:
00078   static vtkPBGLRMATGraphSource* New();
00079   vtkTypeMacro(vtkPBGLRMATGraphSource,vtkGraphAlgorithm);
00080   void PrintSelf(ostream& os, vtkIndent indent);
00081 
00083 
00085   vtkGetMacro(NumberOfVertices, vtkIdType);
00087 
00090   virtual void SetNumberOfVertices(vtkIdType value);
00091 
00093 
00095   vtkGetMacro(NumberOfEdges, vtkIdType);
00096   vtkSetClampMacro(NumberOfEdges, vtkIdType, 0, VTK_LARGE_ID);
00098 
00100   void SetProbabilities(double A, double B, double C, double D);
00101 
00103   void GetProbabilities(double *A, double *B, double *C, double *D);
00104 
00106 
00108   vtkSetMacro(IncludeEdgeWeights, bool);
00109   vtkGetMacro(IncludeEdgeWeights, bool);
00110   vtkBooleanMacro(IncludeEdgeWeights, bool);
00112 
00114 
00115   vtkSetStringMacro(EdgeWeightArrayName);
00116   vtkGetStringMacro(EdgeWeightArrayName);
00118 
00120 
00122   vtkSetMacro(AllowSelfLoops, bool);
00123   vtkGetMacro(AllowSelfLoops, bool);
00124   vtkBooleanMacro(AllowSelfLoops, bool);
00126 
00128 
00129   vtkSetMacro(GeneratePedigreeIds, bool);
00130   vtkGetMacro(GeneratePedigreeIds, bool);
00131   vtkBooleanMacro(GeneratePedigreeIds, bool);
00133 
00135 
00136   vtkSetStringMacro(VertexPedigreeIdArrayName);
00137   vtkGetStringMacro(VertexPedigreeIdArrayName);
00139 
00141 
00142   vtkSetStringMacro(EdgePedigreeIdArrayName);
00143   vtkGetStringMacro(EdgePedigreeIdArrayName);
00145 
00147 
00150   vtkSetMacro(Seed, int);
00151   vtkGetMacro(Seed, int);
00153 
00154 protected:
00155   vtkPBGLRMATGraphSource();
00156   ~vtkPBGLRMATGraphSource();
00157   vtkIdType NumberOfVertices;
00158   vtkIdType NumberOfEdges;
00159   double A;
00160   double B;
00161   double C;
00162   double D;
00163   bool IncludeEdgeWeights;
00164   bool AllowSelfLoops;
00165   bool GeneratePedigreeIds;
00166   int Seed;
00167   char* EdgeWeightArrayName;
00168   char* VertexPedigreeIdArrayName;
00169   char* EdgePedigreeIdArrayName;
00170 
00171   virtual int RequestData(
00172     vtkInformation*, 
00173     vtkInformationVector**, 
00174     vtkInformationVector*);
00175 
00177 
00178   virtual int RequestDataObject(vtkInformation*, 
00179                                 vtkInformationVector** inputVector, 
00180                                 vtkInformationVector* outputVector);
00182 
00183 private:
00184   vtkPBGLRMATGraphSource(const vtkPBGLRMATGraphSource&); // Not implemented
00185   void operator=(const vtkPBGLRMATGraphSource&);   // Not implemented
00186 };
00187 
00188 #endif
00189