.. _program_listing_file_src_sparsebase_partition_pulp_partition.h: Program Listing for File pulp_partition.h ========================================= |exhale_lsh| :ref:`Return to documentation for file ` (``src/sparsebase/partition/pulp_partition.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #include #include "sparsebase/config.h" #include "sparsebase/format/csr.h" #include "sparsebase/partition/partitioner.h" #include "sparsebase/utils/parameterizable.h" #ifndef SPARSEBASE_PROJECT_PULP_PARTITION_H #define SPARSEBASE_PROJECT_PULP_PARTITION_H namespace sparsebase::partition { #ifdef USE_PULP struct PulpPartitionParams : utils::Parameters { double vert_balance = 1.1; double edge_balance = 1.5; bool do_lp_init = false; bool do_bfs_init = true; bool do_repart = false; bool do_edge_balance = false; bool do_maxcut_balance = false; bool verbose_output = false; int seed = 42; int num_partitions = 2; }; /* ! * Wraps the PULP partitioner available here: * https://github.com/HPCGraphAnalysis/PuLP. The library must be compiled with * the USE_PULP option turned on and the pre-built PULP library should be * available. See the Optional Dependencies page (under Getting Started) in our * documentation for more info. */ template class PulpPartition : public Partitioner { private: static IDType *PartitionCSR(std::vector formats, utils::Parameters *params); public: typedef PulpPartitionParams ParamsType; PulpPartition(); PulpPartition(ParamsType params); }; #endif } // namespace sparsebase::partition #ifdef _HEADER_ONLY #include "sparsebase/partition/pulp_partition.cc" #endif #endif // SPARSEBASE_PROJECT_PULP_PARTITION_H