Isorropia: Partitioning, Load Balancing and more
Isorropia_CostDescriber.hpp
Go to the documentation of this file.
1//@HEADER
2//************************************************************************
3//
4// Isorropia: Partitioning and Load Balancing Package
5// Copyright (2006) Sandia Corporation
6//
7//Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8//license for use of this work by or on behalf of the U.S. Government.
9//
10// Redistribution and use in source and binary forms, with or without
11// modification, are permitted provided that the following conditions are
12// met:
13//
14// 1. Redistributions of source code must retain the above copyright
15// notice, this list of conditions and the following disclaimer.
16//
17// 2. Redistributions in binary form must reproduce the above copyright
18// notice, this list of conditions and the following disclaimer in the
19// documentation and/or other materials provided with the distribution.
20//
21// 3. Neither the name of the Corporation nor the names of the
22// contributors may be used to endorse or promote products derived from
23// this software without specific prior written permission.
24//
25// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36//
37//************************************************************************
38//@HEADER
39
40#ifndef _Isorropia_CostDescriber_hpp_
41#define _Isorropia_CostDescriber_hpp_
42
44#include <Teuchos_ParameterList.hpp>
45
51namespace Isorropia {
52
62public:
63
65 virtual ~CostDescriber() {}
66
67private:
73 virtual void setParameters(const Teuchos::ParameterList& paramlist) = 0;
74
80 virtual bool haveVertexWeights() const = 0;
81
88 virtual int getNumVertices() const = 0;
89
99 virtual void getVertexWeights(int numVertices,
100 int* global_ids,
101 float* weights) const = 0;
102
108 virtual bool haveGraphEdgeWeights() const = 0;
109
118 virtual int getNumGraphEdges(int vertex_global_id) const = 0;
119
135 virtual void getGraphEdgeWeights(int vertex_global_id,
136 int num_neighbors,
137 int* neighbor_global_ids,
138 float* weights) const = 0;
139
145 virtual bool haveHypergraphEdgeWeights() const = 0;
146
152 virtual int getNumHypergraphEdgeWeights() const = 0;
153
166 virtual void getHypergraphEdgeWeights(int numEdges,
167 int* global_ids,
168 float* weights) const = 0;
169};//class CostDescriber
170
171}//namespace Isorropia
172
173#endif
174
Interface (abstract base class) for describing the weights or costs associated with the vertices and/...
Definition Isorropia_CostDescriber.hpp:61
virtual bool haveVertexWeights() const =0
Query whether vertex weights have been supplied by the application.
virtual ~CostDescriber()
Destructor.
Definition Isorropia_CostDescriber.hpp:65
virtual bool haveGraphEdgeWeights() const =0
Query whether graph edge weights have been supplied by the application.
virtual void getHypergraphEdgeWeights(int numEdges, int *global_ids, float *weights) const =0
Get the hypergraph edge weights that were supplied by this process.
virtual bool haveHypergraphEdgeWeights() const =0
Query whether hypergraph edge weights have been supplied by the application.
virtual void getGraphEdgeWeights(int vertex_global_id, int num_neighbors, int *neighbor_global_ids, float *weights) const =0
Get the graph edge weights for a specified vertex.
virtual void getVertexWeights(int numVertices, int *global_ids, float *weights) const =0
Get lists of the vertex ids and weights supplied by this process.
virtual void setParameters(const Teuchos::ParameterList &paramlist)=0
Set parameters for the CostDescriber instance.
virtual int getNumGraphEdges(int vertex_global_id) const =0
Get the number of graph edges for a specified vertex.
virtual int getNumHypergraphEdgeWeights() const =0
Get the number of Hypergraph edges.
virtual int getNumVertices() const =0
Get the number of vertices for which this process supplied vertex weights.
Isorropia is the namespace that contains general definitions that apply to all partitioners and that ...
Definition Isorropia_Epetra.hpp:60