Sparksee 6.1.0
KOpt Class Reference

KOpt class. More...

#include <KOpt.h>

Public Member Functions

 KOpt (sparksee::gdb::Session &session)
 Creates a new instance.
 KOpt (sparksee::gdb::Session &session, sparksee::gdb::OIDList &tour)
 Creates a new instance.
virtual ~KOpt ()
 Destructor.
void AddNodeType (sparksee::gdb::type_t type) throw (sparksee::gdb::Error)
 Allows for traversing nodes of the given type.
void AddAllNodeTypes ()
 Allows for traversing all node types of the graph.
void AddEdgeType (sparksee::gdb::type_t type, sparksee::gdb::EdgesDirection dir) throw (sparksee::gdb::Error)
 Allows for traversing edges of the given type.
void AddAllEdgeTypes (sparksee::gdb::EdgesDirection dir)
 Allows for traversing all edge types of the graph.
void SetEdgeWeightAttributeType (sparksee::gdb::attr_t attr) throw (sparksee::gdb::Error)
 Sets the attribute to use as edge weight.
double GetCurrentCost () const
 Returns tour cost.
sparksee::gdb::OIDList * GetCurrentTour ()
 Returns tour as a list of nodes.
void SetCurrentTour (sparksee::gdb::OIDList &tour)
 Sets current tour as a list of nodes.
void SetMaxIterations (sparksee::gdb::int64_t maxIterations)
 Sets maximum number of iterations.
void SetTimeLimit (sparksee::gdb::int64_t maxTime)
 Limits execution time.
void RunTwoOpt ()
 Runs 2-Opt local search.
void RunThreeOpt ()
 Runs 3-Opt local search.

Detailed Description

KOpt class.

Implements the 2-Opt and 3-Opt algorithms

Author
Sparsity Technologies http://www.sparsity-technologies.com

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