Poros
Classes | Typedefs | Enumerations | Functions
poros.h File Reference

Top level header file for Poros (a C++ implementation of Metis algorithms [http://cs.umn.edu/~metis]). More...

#include <stdint.h>
Include dependency graph for poros.h:

Go to the source code of this file.

Classes

struct  poros_options_struct
 

Typedefs

typedef uint32_t poros_vtx_type
 
typedef uint32_t poros_adj_type
 
typedef uint32_t poros_wgt_type
 
typedef uint32_t poros_pid_type
 

Enumerations

enum  aggregator_type { RANDOM_MATCHING = 0, SORTED_HEAVY_EDGE_MATCHING = 1 }
 Aggregation types. More...
 
enum  bisector_type { RANDOM_BISECTION, BFS_BISECTION }
 Bisector types. More...
 
enum  two_way_refiner_type { FM_TWOWAY_REFINEMENT }
 Two way refinement type. More...
 

Functions

poros_options_struct POROS_defaultOptions (void)
 Generate the default options to execute Poros with. More...
 
int POROS_PartGraphRecursive (poros_vtx_type numVertices, poros_adj_type const *edgePrefix, poros_vtx_type const *edgeList, poros_wgt_type const *vertexWeights, poros_wgt_type const *edgeWeights, poros_pid_type numPartitions, poros_options_struct const *options, poros_wgt_type *totalCutEdgeWeight, poros_pid_type *partitionAssignment)
 Partition a graph using recursive bisection. More...
 

Detailed Description

Top level header file for Poros (a C++ implementation of Metis algorithms [http://cs.umn.edu/~metis]).

Author
Dominique LaSalle domin.nosp@m.ique.nosp@m.@soli.nosp@m.dlak.nosp@m.e.com Copyright 2017-2018
Version
1
Date
2017-10-04

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Typedef Documentation

◆ poros_adj_type

typedef uint32_t poros_adj_type

◆ poros_pid_type

typedef uint32_t poros_pid_type

◆ poros_vtx_type

typedef uint32_t poros_vtx_type

◆ poros_wgt_type

typedef uint32_t poros_wgt_type

Enumeration Type Documentation

◆ aggregator_type

Aggregation types.

Enumerator
RANDOM_MATCHING 
SORTED_HEAVY_EDGE_MATCHING 

◆ bisector_type

Bisector types.

Enumerator
RANDOM_BISECTION 
BFS_BISECTION 

◆ two_way_refiner_type

Two way refinement type.

Enumerator
FM_TWOWAY_REFINEMENT 

Function Documentation

◆ POROS_defaultOptions()

poros_options_struct POROS_defaultOptions ( void  )

Generate the default options to execute Poros with.

Returns
The default options.

◆ POROS_PartGraphRecursive()

int POROS_PartGraphRecursive ( poros_vtx_type  numVertices,
poros_adj_type const *  edgePrefix,
poros_vtx_type const *  edgeList,
poros_wgt_type const *  vertexWeights,
poros_wgt_type const *  edgeWeights,
poros_pid_type  numPartitions,
poros_options_struct const *  options,
poros_wgt_type totalCutEdgeWeight,
poros_pid_type partitionAssignment 
)

Partition a graph using recursive bisection.

Parameters
numVerticesThe number of vertices in the graph.
edgePrefixThe prefixsum of the edge list (xadj or rowptr).
edgeListThe list of edge endpoints (adjncy or rowind).
vertexWeightsThe list of vertex weights (if null, every vertex will be assigned a weight of 1).
edgeWeightsThe weight associated with each edge (if null, every edge will be assigned a weight of 1).
numPartitionsThe number of partitions to create.
optionsThe list of options to use. This may be null when the defaults are desired.
totalCutEdgeWeightThe total weight of cut edges (output).
partitionAssignmentThe partition assignment of each vertex.
Returns
1 on success, 0 if an error occurs.