Zoltan2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Protected Member Functions | List of all members
Zoltan2::EvaluateMapping< Adapter, MachineRep > Class Template Reference

A class that computes and returns quality metrics. More...

#include <Zoltan2_EvaluateMapping.hpp>

Inheritance diagram for Zoltan2::EvaluateMapping< Adapter, MachineRep >:
Inheritance graph
[legend]
Collaboration diagram for Zoltan2::EvaluateMapping< Adapter, MachineRep >:
Collaboration graph
[legend]

Public Member Functions

 EvaluateMapping (const Adapter *ia, ParameterList *p, const RCP< const Comm< int > > &ucomm_, const MappingSolution< Adapter > *soln, const MachineRep *machine_, const RCP< const GraphModel< typename Adapter::base_adapter_t > > &graphModel=Teuchos::null)
 Constructor where communicator is Teuchos default. More...
 
virtual ~EvaluateMapping ()
 
- Public Member Functions inherited from Zoltan2::EvaluatePartition< Adapter >
virtual ~EvaluatePartition ()
 
 EvaluatePartition (const Adapter *ia, ParameterList *p, const PartitioningSolution< Adapter > *soln, const RCP< const GraphModel< typename Adapter::base_adapter_t > > &graphModel=Teuchos::null)
 Constructor where communicator is Teuchos default. More...
 
 EvaluatePartition (const Adapter *ia, ParameterList *p, const RCP< const Comm< int > > &problemComm, const PartitioningSolution< Adapter > *soln, const RCP< const GraphModel< typename Adapter::base_adapter_t > > &graphModel=Teuchos::null)
 Constructor where Teuchos communicator is specified. More...
 
ArrayView< RCP
< base_metric_type > > 
getAllMetricsOfType (std::string metricType) const
 Return the metric list for types matching the given metric type. More...
 
scalar_t getObjectCountImbalance () const
 Return the object count imbalance. More...
 
scalar_t getNormedImbalance () const
 Return the object normed weight imbalance. Normed imbalance is only valid if there is at least 2 elements - the second one is the normed imbalance. If we have weights (which start at the second element) the spec is to have this return that element. More...
 
scalar_t getWeightImbalance (int weightIndex) const
 Return the imbalance for the requested weight. More...
 
scalar_t getMaxEdgeCut () const
 Return the max cut for the requested weight. More...
 
scalar_t getMaxWeightEdgeCut (int weightIndex) const
 getMaxWeightEdgeCuts weighted for the specified index More...
 
scalar_t getTotalEdgeCut () const
 getTotalEdgeCut More...
 
scalar_t getTotalWeightEdgeCut (int weightIndex) const
 getTotalWeightEdgeCut weighted for the specified index More...
 
scalar_t getTotalMessages () const
 getTotalMessages More...
 
scalar_t getMaxMessages () const
 getMaxMessages More...
 
void printMetrics (std::ostream &os) const
 Print all metrics. More...
 
- Public Member Functions inherited from Zoltan2::EvaluateBaseClassRoot
virtual ~EvaluateBaseClassRoot ()
 

Protected Member Functions

virtual void calculate_graph_metrics (const RCP< const Environment > &_env, const RCP< const Comm< int > > &_problemComm, const RCP< const GraphModel< typename Adapter::base_adapter_t > > &_graph, const ArrayView< const typename Adapter::part_t > &_partArray, typename Adapter::part_t &_numGlobalParts, ArrayRCP< RCP< BaseClassMetrics< typename Adapter::scalar_t > > > &_metricsBase, ArrayRCP< typename Adapter::scalar_t > &_globalSums)
 
- Protected Member Functions inherited from Zoltan2::EvaluatePartition< Adapter >
void sharedConstructor (const Adapter *ia, ParameterList *p, const RCP< const Comm< int > > &problemComm, const PartitioningSolution< Adapter > *soln, const RCP< const GraphModel< typename Adapter::base_adapter_t > > &graphModel)
 
 EvaluatePartition (const Adapter *ia, ParameterList *p, const RCP< const Comm< int > > &problemComm, const PartitioningSolution< Adapter > *soln, bool force_evaluate, const RCP< const GraphModel< typename Adapter::base_adapter_t > > &graphModel=Teuchos::null)
 Constructor where communicator is Teuchos default, and takes another parameter whether to evaluate metrics within the constructor or not. More...
 

Detailed Description

template<typename Adapter, typename MachineRep = MachineRepresentation<typename Adapter::scalar_t, typename Adapter::part_t>>
class Zoltan2::EvaluateMapping< Adapter, MachineRep >

A class that computes and returns quality metrics.

Todo:

For some problems it will be necessary to build the Model again in order to compute metrics. For now we don't have any problems like that.

write a unit test for this class

Definition at line 34 of file Zoltan2_EvaluateMapping.hpp.

Constructor & Destructor Documentation

template<typename Adapter , typename MachineRep = MachineRepresentation<typename Adapter::scalar_t, typename Adapter::part_t>>
Zoltan2::EvaluateMapping< Adapter, MachineRep >::EvaluateMapping ( const Adapter *  ia,
ParameterList *  p,
const RCP< const Comm< int > > &  ucomm_,
const MappingSolution< Adapter > *  soln,
const MachineRep *  machine_,
const RCP< const GraphModel< typename Adapter::base_adapter_t > > &  graphModel = Teuchos::null 
)
inline

Constructor where communicator is Teuchos default.

Parameters
iathe problem input adapter
pthe parameter list
solnthe solution
graphModelthe graph model The constructor does global communication to compute the metrics. The rest of the methods are local.

Definition at line 48 of file Zoltan2_EvaluateMapping.hpp.

template<typename Adapter , typename MachineRep = MachineRepresentation<typename Adapter::scalar_t, typename Adapter::part_t>>
virtual Zoltan2::EvaluateMapping< Adapter, MachineRep >::~EvaluateMapping ( )
inlinevirtual

Definition at line 60 of file Zoltan2_EvaluateMapping.hpp.

Member Function Documentation

template<typename Adapter , typename MachineRep = MachineRepresentation<typename Adapter::scalar_t, typename Adapter::part_t>>
virtual void Zoltan2::EvaluateMapping< Adapter, MachineRep >::calculate_graph_metrics ( const RCP< const Environment > &  _env,
const RCP< const Comm< int > > &  _problemComm,
const RCP< const GraphModel< typename Adapter::base_adapter_t > > &  _graph,
const ArrayView< const typename Adapter::part_t > &  _partArray,
typename Adapter::part_t _numGlobalParts,
ArrayRCP< RCP< BaseClassMetrics< typename Adapter::scalar_t > > > &  _metricsBase,
ArrayRCP< typename Adapter::scalar_t > &  _globalSums 
)
inlineprotectedvirtual

Reimplemented from Zoltan2::EvaluatePartition< Adapter >.

Definition at line 63 of file Zoltan2_EvaluateMapping.hpp.


The documentation for this class was generated from the following file: