INGOR
Loading...
Searching...
No Matches
Greedy Class Reference

Greedy Hill-Climbing algorithm. More...

#include <algo/Greedy.h>

Public Member Functions

ytNetworkGreedy_exec (Args *args)
 Executes the HC algorithm.
 
double Greedy_trials (Args *args, GreedyWork *work, ytPCGraph *best_g)
 Performs the HC algorithm GreedyWork::trials times.
 
GreedyWorkGreedyWork_new (Args *args)
 Creates and initializes a new GreedyWork instance.
 
ytGraphGreedy_graph (Args *args, ytGraph *g)
 Performs the greedy algorithm and returns the result as graph.
 

Detailed Description

Greedy Hill-Climbing algorithm.

See Greedy Hill-Climbing Algorithm for the usage of the algorithm.

Member Function Documentation

◆ Greedy_graph()

ytGraph * Greedy_graph ( Args * args,
ytGraph * g )

Performs the greedy algorithm and returns the result as graph.

This is maily for performing the algorithm from the NNSR algorithm. This returns the ytGraph instance instead of ytNetwork. Therefore this omits the several processes for preparing ytNetwork instance to return.

Also this does not support following functions implemented in Greedy_exec().

Parameters
args
g
Returns

◆ Greedy_trials()

double Greedy_trials ( Args * args,
GreedyWork * work,
ytPCGraph * best_g )

Performs the HC algorithm GreedyWork::trials times.

Parameters
args
work
best_g
Returns
best score during the trials.

◆ GreedyWork_new()

GreedyWork * GreedyWork_new ( Args * args)

Creates and initializes a new GreedyWork instance.

This refers to Args::data, Args::algoArgs, and Args::verbose.

Parameters
argsArguments for the algorithm is given by Args::algoArgs field.

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