|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--AbstractCCAHeuristic
This abstract class provides a skeleton implementation of the CCAHeuristic interface to minimize the effort to implement this interface.
CCAHeuristic
Constructor Summary | |
AbstractCCAHeuristic()
Constructs a new AbstractCCAHeuristic without a defined problem, a problem must be defined later by means of the setProblem method. |
|
AbstractCCAHeuristic(Yutsis y)
Constructs a new AbstractCCAHeuristic with given Yutsis object and corresponding CycleGenerator. |
|
AbstractCCAHeuristic(Yutsis y,
CycleGenerator cg)
Constructs a new AbstractCCAHeuristic with given Yutsis object and corresponding CycleGenerator. |
Method Summary | |
Cycle |
bestCycle(int[] bestcycleedge)
This function returns the best Cycle to reduce and
fills the best edge to interchange out of the cycle (min length
4). |
Cycle |
bestCycle(int[] bestcycleedge,
int[] besticnodes)
This function returns the best Cycle to reduce and fills
the best edge to interchange out of the cycle (min length 4)
together with the best interchange nodes in a canonical way. |
int[] |
canonicalIC(int[] icedge,
int[] icnodes)
This method returns a canonical representation of the given interchange, without applying it. |
int[] |
canonicalIC(int[] icedge,
int[] icnodes,
int[] alticnodes)
This method returns a canonical representation of the given interchange, without applying it. |
CycleGenerator |
cycleGenerator()
Returns the CycleGenerator used by this CCAHeuristic. |
int[] |
interchangeNodes(Cycle bestcycle,
int[] bestcycleedge)
This method returns the nodes to be interchanged from the bestcycledge in order to reduce the
bestcycle one unit in length and makes it
canonical, without applying the interchange itself. |
Yutsis |
problem()
Returns the problem considered. |
void |
setProblem(Yutsis y)
Sets the Yutsis object for which operations must be choosen, a CycleGenerator will be constructed for the given Yutsis object. |
void |
setProblem(Yutsis y,
CycleGenerator cg)
Sets the Yutsis object defining for which operations must be choosen, together with the CycleGenerator delivering the relevant cycles. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface CCAHeuristic |
bestCycle |
Constructor Detail |
public AbstractCCAHeuristic()
setProblem(Yutsis)
public AbstractCCAHeuristic(Yutsis y)
y
- the Yutsis object for which an operation has to be chosenYutsis
,
CycleGenerator
public AbstractCCAHeuristic(Yutsis y, CycleGenerator cg)
y
- the Yutsis object for which an operation has to be chosencg
- the cycle generator containing the relevant cycles of yYutsis
,
CycleGenerator
Method Detail |
public void setProblem(Yutsis y)
setProblem
in interface CCAHeuristic
y
- the Yutsis object for an operation has to be chosenYutsis
,
CycleGenerator
public void setProblem(Yutsis y, CycleGenerator cg)
setProblem
in interface CCAHeuristic
y
- the Yutsis object for which an operation has to be chosencg
- the cycle generator containing the relevant cycles of yYutsis
,
CycleGenerator
public Yutsis problem()
problem
in interface CCAHeuristic
Yutsis
public CycleGenerator cycleGenerator()
cycleGenerator
in interface CCAHeuristic
CycleGenerator
public int[] interchangeNodes(Cycle bestcycle, int[] bestcycleedge)
bestcycledge
in order to reduce the
bestcycle
one unit in length and makes it
canonical, without applying the interchange itself. The
canonical representation: take an edge (a.b)
with adjacent edges (a,c), (a,d), (b,e), (b,f) then an
IC a b c e is valid iff a < b && c < d.
interchangeNodes
in interface CCAHeuristic
bestcycle
- the Cycle
to be reducedbestcycleedge
- the edge on which to apply the interchange
bestcycleedge
in order to reduce the cycle one unit in length.Cycle
public int[] canonicalIC(int[] icedge, int[] icnodes)
canonicalIC
in interface CCAHeuristic
icedge
- the nodes of the edge on which the interchange appliesicnodes
- the nodes to be interchanged
public int[] canonicalIC(int[] icedge, int[] icnodes, int[] alticnodes)
canonicalIC
in interface CCAHeuristic
icedge
- the nodes of the edge on which the interchange appliesicnodes
- the nodes to be interchangedalticnodes
- the alternative nodes to be interchanged yielding
the same effect.
public Cycle bestCycle(int[] bestcycleedge)
Cycle
to reduce and
fills the best edge to interchange out of the cycle (min length
4). It will use a CycleGenerator
to generate all
relevant cycles.
bestCycle
in interface CCAHeuristic
bestcycleedge
- array where the best edge to be interchanged
out of the Cycle
will be filled in
Cycle
public Cycle bestCycle(int[] bestcycleedge, int[] besticnodes)
Cycle
to reduce and fills
the best edge to interchange out of the cycle (min length 4)
together with the best interchange nodes in a canonical way. It
will use a CycleGenerator
to generate all relevant
cycles.
bestCycle
in interface CCAHeuristic
bestcycleedge
- array where the best edge to be interchanged
out of the Cycle
will be filled inbesticnodes
- array where the best icnodes will be filled in
Cycle
CycleCostAlgorithm
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |