/usr/include/trilinos/Isorropia_CostDescriber.hpp is in libtrilinos-dev 10.4.0.dfsg-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | //@HEADER
/*
************************************************************************
Isorropia: Partitioning and Load Balancing Package
Copyright (2006) Sandia Corporation
Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
license for use of this work by or on behalf of the U.S. Government.
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
************************************************************************
*/
//@HEADER
#ifndef _Isorropia_CostDescriber_hpp_
#define _Isorropia_CostDescriber_hpp_
#include <Isorropia_ConfigDefs.hpp>
#include <Teuchos_ParameterList.hpp>
/** Isorropia is the namespace that contains general definitions that
apply to all partitioners and that contains abstract classes that
declare the methods and data to be supplied by specific partitioners.
*/
namespace Isorropia {
/** Interface (abstract base class) for describing the weights or costs
associated with the vertices and/or edges or hyperedges of the object to be
partitioned, ordered or colored.
A CostDescriber object is created by the application. If no CostDescriber is supplied by the
application, sensible default weights should be used.
*/
class CostDescriber {
public:
/** Destructor */
virtual ~CostDescriber() {}
private:
/** Set parameters for the CostDescriber instance. The contents of the
input paramlist object are copied into an internal ParameterList
attribute. Instances of this interface should not retain a reference
to the input ParameterList after this method returns.
*/
virtual void setParameters(const Teuchos::ParameterList& paramlist) = 0;
/** Query whether vertex weights have been supplied by the application.
\return returns true if the application has supplied vertex weights
with the CostDescriber, false otherwise
*/
virtual bool haveVertexWeights() const = 0;
/** Get the number of vertices for which this process supplied
vertex weights. Vertices typically correspond to matrix rows.
\return returns the number of vertices on this process for which
the CostDescriber has vertex weights
*/
virtual int getNumVertices() const = 0;
/** Get lists of the vertex ids and weights supplied by this process.
\param numVertices size of global_ids and weights arrays
\param global_ids pointer to an array of vertex global IDs,
allocated by the caller.
\param weights pointer to an array of vertex weights,
allocated by the caller.
*/
virtual void getVertexWeights(int numVertices,
int* global_ids,
float* weights) const = 0;
/** Query whether graph edge weights have been supplied by the application.
\return returns true if the application has supplied graph edge weights
with the CostDescriber, false otherwise
*/
virtual bool haveGraphEdgeWeights() const = 0;
/** Get the number of graph edges for a specified vertex.
Graph edges typically correspond to matrix nonzeros.
\param vertex_global_id The global ID for the vertex (on this process)
for which the number of edges is desired
\return the number of graph edges supplied by this process for this vertex
*/
virtual int getNumGraphEdges(int vertex_global_id) const = 0;
/** Get the graph edge weights for a specified vertex.
\param vertex_global_id vertex global ID (on this process) for which
edge information is requested
\param num_neighbors size for which neighbor_global_ids and weights
had been preallocated
\param neighbor_global_ids buffer allocated by caller, on return will
contain a list of neighbor vertex global IDs
\param weights buffer allocated by caller, on return will contain a
weight for each edge indicated in neighbor_global_ids
*/
virtual void getGraphEdgeWeights(int vertex_global_id,
int num_neighbors,
int* neighbor_global_ids,
float* weights) const = 0;
/** Query whether hypergraph edge weights have been supplied by the application.
\return returns true if the application has supplied hypergraph edge weights
with the CostDescriber, false otherwise
*/
virtual bool haveHypergraphEdgeWeights() const = 0;
/** Get the number of Hypergraph edges. Hypergraph edges typically
correspond to matrix columns.
\return returns the number of hypergraph edge weights supplied by this process
*/
virtual int getNumHypergraphEdgeWeights() const = 0;
/** Get the hypergraph edge weights that were supplied by this process
\param numEdges size for which global_ids and weights
had been preallocated
\param global_ids buffer allocated by caller, on return will
contain a list of hyperedge global IDs
\param weights buffer allocated by caller, on return will contain a
weight for each hyperedge indicated in global_ids
*/
virtual void getHypergraphEdgeWeights(int numEdges,
int* global_ids,
float* weights) const = 0;
};//class CostDescriber
}//namespace Isorropia
#endif
|