00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _Isorropia_EpetraCostDescriber_hpp_
00033 #define _Isorropia_EpetraCostDescriber_hpp_
00034
00035 #include <Isorropia_configdefs.hpp>
00036 #include <Teuchos_RefCountPtr.hpp>
00037 #include <Teuchos_ParameterList.hpp>
00038
00039 #include <Isorropia_CostDescriber.hpp>
00040
00041 #ifdef HAVE_EPETRA
00042 class Epetra_Vector;
00043 class Epetra_CrsMatrix;
00044
00048 namespace Isorropia {
00049
00053 namespace Epetra {
00054
00057 class CostDescriber : public Isorropia::CostDescriber {
00058 public:
00060 CostDescriber();
00061
00063 virtual ~CostDescriber();
00064
00070 void setParameters(const Teuchos::ParameterList& paramlist);
00071
00074 void setVertexWeights(Teuchos::RefCountPtr<Epetra_Vector> vwts);
00075
00078 void setGraphEdgeWeights(Teuchos::RefCountPtr<Epetra_CrsMatrix> gewts);
00079
00082 void setHypergraphEdgeWeights(Teuchos::RefCountPtr<Epetra_Vector> hgewts);
00083
00088 bool haveVertexWeights() const;
00089
00093 int getNumVertices() const;
00094
00097 void getVertexWeights(int numVertices,
00098 int* global_ids,
00099 float* weights) const;
00100
00105 bool haveGraphEdgeWeights() const;
00106
00110 int getNumGraphEdges(int vertex_global_id) const;
00111
00114 void getGraphEdgeWeights(int vertex_global_id,
00115 int num_neighbors,
00116 int* neighbor_global_ids,
00117 float* weights) const;
00118
00123 bool haveHypergraphEdgeWeights() const;
00124
00128 int getNumHypergraphEdges() const;
00129
00132 void getHypergraphEdgeWeights(int numEdges,
00133 int* global_ids,
00134 float* weights) const;
00135
00136 private:
00137 Teuchos::RefCountPtr<Epetra_Vector> vertex_weights_;
00138 Teuchos::RefCountPtr<Epetra_CrsMatrix> graph_edge_weights_;
00139 Teuchos::RefCountPtr<Epetra_Vector> hypergraph_edge_weights_;
00140 Teuchos::ParameterList paramlist_;
00141 };
00142
00143 }
00144 }
00145
00146 #endif //HAVE_EPETRA
00147
00148 #endif
00149