|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface of an heuristic to be used with the CycleCostAlgorithm class to reduce a Yutsis object with at least operations possible.
CycleCostAlgorithm
,
Yutsis
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. |
Cycle |
bestCycle(int[] bestcycleedge,
int[] besticnodes,
java.util.ArrayList candidates)
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. |
Method Detail |
public void setProblem(Yutsis y)
Yutsis
,
CycleGenerator
public void setProblem(Yutsis y, CycleGenerator cg)
Yutsis
,
CycleGenerator
public Yutsis problem()
Yutsis
public CycleGenerator cycleGenerator()
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.
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)
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)
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.
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.
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
public Cycle bestCycle(int[] bestcycleedge, int[] besticnodes, java.util.ArrayList candidates)
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.
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 incandidates
- ArrayList which will be filled with equivalent
operations, the first corresponds to the returned
best Cycle.
Cycle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |