Isorropia_CostDescriber.hpp

Go to the documentation of this file.
00001 //@HEADER
00002 /*
00003 ************************************************************************
00004 Isorropia: Partitioning and Load Balancing Package
00005                 Copyright (2006) Sandia Corporation
00006 
00007 Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 license for use of this work by or on behalf of the U.S. Government.
00009 
00010 This library is free software; you can redistribute it and/or modify
00011 it under the terms of the GNU Lesser General Public License as
00012 published by the Free Software Foundation; either version 2.1 of the
00013 License, or (at your option) any later version.
00014 
00015 This library is distributed in the hope that it will be useful, but
00016 WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 Lesser General Public License for more details.
00019 
00020 You should have received a copy of the GNU Lesser General Public
00021 License along with this library; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 USA
00024 
00025 ************************************************************************
00026 */
00027 //@HEADER
00028 
00029 #ifndef _Isorropia_CostDescriber_hpp_
00030 #define _Isorropia_CostDescriber_hpp_
00031 
00032 #include <Isorropia_ConfigDefs.hpp>
00033 #include <Teuchos_ParameterList.hpp>
00034 
00040 namespace Isorropia {
00041 
00050 class CostDescriber {
00051 public:
00052 
00054   virtual ~CostDescriber() {}
00055 
00056 private:
00062   virtual void setParameters(const Teuchos::ParameterList& paramlist) = 0;
00063 
00069   virtual bool haveVertexWeights() const = 0;
00070 
00077   virtual int getNumVertices() const = 0;
00078 
00088   virtual void getVertexWeights(int numVertices,
00089                                 int* global_ids,
00090                                 float* weights) const = 0;
00091 
00097   virtual bool haveGraphEdgeWeights() const = 0;
00098 
00107   virtual int getNumGraphEdges(int vertex_global_id) const = 0;
00108 
00124   virtual void getGraphEdgeWeights(int vertex_global_id,
00125                                    int num_neighbors,
00126                                    int* neighbor_global_ids,
00127                                    float* weights) const = 0;
00128 
00134   virtual bool haveHypergraphEdgeWeights() const = 0;
00135 
00141   virtual int getNumHypergraphEdgeWeights() const = 0;
00142 
00155   virtual void getHypergraphEdgeWeights(int numEdges,
00156                                         int* global_ids,
00157                                         float* weights) const = 0;
00158 };//class CostDescriber
00159 
00160 }//namespace Isorropia
00161 
00162 #endif
00163