KOpt class.
More...
KOpt class.
Implements the 2-Opt and 3-Opt algorithms
- Author
- Sparsity Technologies http://www.sparsity-technologies.com
- (void) addAllEdgeTypes: |
|
(enum STSEdgesDirection) |
dir |
|
Allows for traversing all edge types of the graph.
- Parameters
-
- (void) addEdgeType: |
|
(int) |
type |
dir: |
|
(enum STSEdgesDirection) |
dir |
|
|
| |
Allows for traversing edges of the given type.
If the edge type was already added, the existing direction is overwritten
- Parameters
-
type | [in] Edge type. |
dir | [in] Edge direction. |
- Exceptions
-
System.ApplicationException | null |
- (void) addNodeType: |
|
(int) |
type |
|
Allows for traversing nodes of the given type.
sparksee::gdb::Error
- Parameters
-
- Exceptions
-
System.ApplicationException | null |
Closes the KOpt instance.
It must be called to ensure the integrity of all data.
Creates a new instance.
- Parameters
-
session | [in] Session to get the graph from and perform algorithm. |
Sets current tour as a list of nodes.
- Parameters
-
tour | [in] Initial tour that needs to be improved. |
- (void) setEdgeWeightAttributeType: |
|
(int) |
attr |
|
Sets the attribute to use as edge weight.
If the multiple edge are set for traversal, this attribute must be of type GLOBAL_TYPE or EDGES_TYPE. Additionally, the attribute must be of type Double.
sparksee::gdb::Error
- Parameters
-
attr | [in] The attribute type to use as a weight. Default: InvalidAttribute |
- Exceptions
-
System.ApplicationException | null |
- (void) setMaxIterations: |
|
(long long) |
maxIterations |
|
Sets maximum number of iterations.
By default the algorithm will run until no improvement can be made in the current tour.
- Parameters
-
maxIterations | [in] Maximum number of iterations |
- (void) setTimeLimit: |
|
(long long) |
maxTime |
|
Limits execution time.
- Parameters
-
maxTime | [in] Time limit in miliseconds |
The documentation for this class was generated from the following file: