40 #ifndef _Isorropia_EpetraCostDescriber_hpp_ 41 #define _Isorropia_EpetraCostDescriber_hpp_ 45 #include <Teuchos_RCP.hpp> 46 #include <Teuchos_ParameterList.hpp> 55 class Epetra_CrsMatrix;
56 class Epetra_RowMatrix;
57 class Epetra_MultiVector;
59 class Epetra_CrsGraph;
159 void setVertexWeights(Teuchos::RCP<const Epetra_Vector> vwgts);
172 void setGraphEdgeWeights(Teuchos::RCP<const Epetra_CrsMatrix> gewts);
183 void setHypergraphEdgeWeights(Teuchos::RCP<const Epetra_Vector> hgewts);
201 void setHypergraphEdgeWeights(
int numHGedges,
const int *hgGIDs,
const float *hgEwgts);
206 void setHypergraphEdgeWeights(
int numHGedges,
const int *hgGIDs,
const double *hgEwgts);
216 void getCosts(std::map<int, float > &vertexWeights,
217 std::map<
int, std::map<int, float > > &graphEdgeWeights,
218 std::map<int, float > &hypergraphEdgeWeights)
const;
222 void show_cd(std::ostream &)
const;
227 int compareBeforeAndAfterHypergraph(
const Epetra_RowMatrix &in_m,
const Epetra_RowMatrix &out_m,
228 const Epetra_Import &importer,
229 std::vector<double> &balance, std::vector<double> &cutn, std::vector<double> &cutl)
const;
231 int compareBeforeAndAfterGraph(
const Epetra_RowMatrix &in_m,
const Epetra_RowMatrix &out_m,
232 const Epetra_Import &importer,
233 std::vector<double> &balance, std::vector<int> &numCuts, std::vector<double> &cutWgt,
234 std::vector<double> &cutn, std::vector<double> &cutl)
const;
236 int compareBeforeAndAfterGraph(
const Epetra_CrsGraph &in_g,
const Epetra_CrsGraph &out_g,
237 const Epetra_Import &importer,
238 std::vector<double> &balance, std::vector<int> &numCuts, std::vector<double> &cutWgt,
239 std::vector<double> &cutn, std::vector<double> &cutl)
const;
241 int compareBeforeAndAfterImbalance(
const Epetra_MultiVector &mv,
const Epetra_Import &importer,
242 std::vector<double> &min, std::vector<double> &max, std::vector<double> &avg)
const;
247 void _transformWeights(
const Epetra_Import &importer);
249 int _compareBeforeAndAfterGraph(
const Epetra_RowMatrix *in_m,
const Epetra_RowMatrix *out_m,
250 const Epetra_CrsGraph *in_g,
const Epetra_CrsGraph *out_g,
251 const Epetra_Import &importer,
252 std::vector<double> &balance, std::vector<int> &numCuts, std::vector<double> &cutWgt,
253 std::vector<double> &cutn, std::vector<double> &cutl)
const;
257 void setParameters(
const Teuchos::ParameterList& paramlist);
261 bool haveVertexWeights()
const;
264 int getNumVertices()
const;
267 void getVertexWeights(
int numVertices,
268 int* global_ids,
float* weights)
const;
271 bool haveGraphEdgeWeights()
const;
274 int getNumGraphEdges(
int vertex_global_id)
const;
280 int getGraphEdgeVertices(std::set<int> &gids)
const;
285 void getGraphEdgeWeights(
int vertex_global_id,
287 int* neighbor_global_ids,
288 float* weights)
const;
291 bool haveHypergraphEdgeWeights()
const;
294 int getNumHypergraphEdgeWeights()
const;
297 void getHypergraphEdgeWeights(
int numEdges,
299 float* weights)
const;
306 int getHypergraphEdgeWeights(std::map<int, float> &wgtMap)
const;
314 int getVertexWeights(std::map<int, float> &wgtMap)
const;
327 int getGraphEdgeWeights(
int vertex_global_id, std::map<int, float> &wgtMap)
const;
334 bool haveGlobalVertexWeights()
const;
339 void setNumGlobalVertexWeights(
int num);
344 bool haveGlobalGraphEdgeWeights()
const;
349 void setNumGlobalGraphEdgeWeights(
int num);
354 bool haveGlobalHypergraphEdgeWeights()
const;
359 void setNumGlobalHypergraphEdgeWeights(
int num);
363 void allocate_hg_edge_weights_(
int n);
367 void free_hg_edge_weights_();
395 int getEdges(
int vertexGID,
int len,
int *nborGID,
float *weights)
const;
Isorropia is the namespace that contains general definitions that apply to all partitioners and that ...
Definition: Isorropia_Epetra.hpp:60
float * hg_edge_weights_
Definition: Isorropia_EpetraCostDescriber.hpp:376
int * hg_edge_gids_
Definition: Isorropia_EpetraCostDescriber.hpp:375
Teuchos::ParameterList paramlist_
Definition: Isorropia_EpetraCostDescriber.hpp:373
QueryObject is a class that contains the query functions required by the Zoltan library.
Definition: QueryObject.hpp:81
Interface (abstract base class) for describing the weights or costs associated with the vertices and/...
Definition: Isorropia_CostDescriber.hpp:61
const Epetra_Vector & getVertexWeights()
Definition: Isorropia_EpetraCostDescriber.hpp:317
int numGlobalHypergraphEdgeWeights_
Definition: Isorropia_EpetraCostDescriber.hpp:381
int numGlobalGraphEdgeWeights_
Definition: Isorropia_EpetraCostDescriber.hpp:380
int num_hg_edge_weights_
Definition: Isorropia_EpetraCostDescriber.hpp:377
Definition: Isorropia_EpetraZoltanLib.hpp:70
Teuchos::RCP< const Epetra_CrsMatrix > graph_edge_weights_
Definition: Isorropia_EpetraCostDescriber.hpp:370
Interface (abstract base class) for computing a new partitioning/coloring/ ordering and exploiting th...
Definition: Isorropia_Operator.hpp:58
int numGlobalVertexWeights_
Definition: Isorropia_EpetraCostDescriber.hpp:379
std::set< int > graph_self_edges_
Definition: Isorropia_EpetraCostDescriber.hpp:371
Definition: Isorropia_EpetraCostDescriber.hpp:128
Teuchos::RCP< const Epetra_Vector > vertex_weights_
Definition: Isorropia_EpetraCostDescriber.hpp:369