origincomment
Class ArbrePalindrome

java.lang.Object
  extended by origincomment.ArbrePalindrome

public class ArbrePalindrome
extends java.lang.Object

Palindrome tree of execution in algorithm.

Author:
Stéfan Engelen (2006) for coding..., Gabriel Chandesris (2008) for comments and makeing the code readable.
See Also:
NoeudPalindrome, ADN1cible.tableauPalindrome, ADN1cible.initialiser(), ADN1cible.load_File(java.io.BufferedReader)

Field Summary
private  NoeudPalindrome courant
          Current node (default is null).
private  java.util.Vector structures
          Structures (default is instanciate as a new Vector).
 
Constructor Summary
ArbrePalindrome()
          Default constructor with a new current node.
ArbrePalindrome(NoeudPalindrome n)
          Constrcutor with a given node.
 
Method Summary
 void actualiser()
          To set the structureS to be "in good mood".
 void ajouteStructures(Palindrome1cible[] tab)
          To add new StructureS.
 void changeCourant(NoeudPalindrome n)
          To set a new current node.
 void changeStructures(java.util.Vector v)
          To set new structureS.
 void descendre(int i)
          To get down in the tree : change current node to a choosen son of current node.
 java.util.Vector les_feuilles()
          Leaves of the root node.
private static void les_feuilles(java.util.Vector feuilles, NoeudPalindrome n)
          Leaves of the given node are put in the Vector.
 java.util.Vector quellesStructures()
          To get the current structures.
 Palindrome1cible[] quelleStructure(int i)
          To get a specific structure in structureS.
 NoeudPalindrome quelNoeudCourant()
          To get current node of execution of the algorithm.
 Palindrome1cible quelPalindrome(int pos_struct, int pos_pal)
          To get a specific palindrome in a psecific structure.
private static void recuperation(java.util.Vector resultat, Palindrome1cible[] tabPal, NoeudPalindrome n)
          "Recuperation"
 void remonter()
          To get up in the tree : change current node to the father of current node.
private  java.util.Vector tous_les_palindromes()
          "All Palindromes"
 void trier_structures()
          Sorting the structureS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

courant

private NoeudPalindrome courant
Current node (default is null).


structures

private java.util.Vector structures
Structures (default is instanciate as a new Vector). To be a vector of tables of palindromes (Vector of Palindrome1cible[]).

Constructor Detail

ArbrePalindrome

public ArbrePalindrome()
Default constructor with a new current node.

See Also:
ADN1cible.initialiser(), ADN1cible.load_File(java.io.BufferedReader)

ArbrePalindrome

public ArbrePalindrome(NoeudPalindrome n)
Constrcutor with a given node.

Parameters:
n - (NoeudPalindrome)
See Also:
ADN1cible.change_palindromes(Palindrome1cible[])
Method Detail

quelNoeudCourant

public NoeudPalindrome quelNoeudCourant()
To get current node of execution of the algorithm.

Returns:
(NoeudPalindrome)
See Also:
ADN1cible.calcul_Resultat(ADN1test[], int, boolean, boolean), ADN1cible.load_File(java.io.BufferedReader), ADN1cible.recherche_Palindrome(ADN1cible, int, int, int, ADN1test[], int, int, boolean, int)

quellesStructures

public java.util.Vector quellesStructures()
To get the current structures.

Returns:
(Vector)
See Also:
structures, ADN1cible.les_structures()

quelleStructure

public Palindrome1cible[] quelleStructure(int i)
To get a specific structure in structureS.

Parameters:
i - (int) position
Returns:
(Palindrome1cible[])

quelPalindrome

public Palindrome1cible quelPalindrome(int pos_struct,
                                       int pos_pal)
To get a specific palindrome in a psecific structure.

Parameters:
pos_struct - (int) position of the structure
pos_pal - (int) position of the palindrome
Returns:
(Palindrome1cible)
See Also:
ADN1cible.le_palindrome(int, int), ADN1cible.to_File(String)

changeCourant

public void changeCourant(NoeudPalindrome n)
To set a new current node.

Parameters:
n - (NoeudPalindrome)

changeStructures

public void changeStructures(java.util.Vector v)
To set new structureS.

Parameters:
v - (Vector)

ajouteStructures

public void ajouteStructures(Palindrome1cible[] tab)
To add new StructureS.

Parameters:
tab - (Palindrome1cible[])

remonter

public void remonter()
To get up in the tree : change current node to the father of current node.

See Also:
ADN1cible.recherche_Palindrome(ADN1cible, int, int, int, ADN1test[], int, int, boolean, int)

descendre

public void descendre(int i)
To get down in the tree : change current node to a choosen son of current node.

Parameters:
i - (int)
See Also:
ADN1cible.recherche_Palindrome(ADN1cible, int, int, int, ADN1test[], int, int, boolean, int)

trier_structures

public void trier_structures()
Sorting the structureS.

See Also:
ADN1cible.calcul_Resultat(ADN1test[], int, boolean, boolean), ADN1cible.load_File(java.io.BufferedReader), ADN1cible.resultat_commun(Vector)

actualiser

public void actualiser()
To set the structureS to be "in good mood".

See Also:
tous_les_palindromes(), trier_structures(), ADN1cible.calcul_Resultat(ADN1test[], int, boolean, boolean), ADN1cible.recherche_Pseudonoeud(Base[], ADN1test[], boolean, int, int)

tous_les_palindromes

private java.util.Vector tous_les_palindromes()
"All Palindromes"

Returns:
(Vector)
See Also:
actualiser(), recuperation(Vector, Palindrome1cible[], NoeudPalindrome)

recuperation

private static void recuperation(java.util.Vector resultat,
                                 Palindrome1cible[] tabPal,
                                 NoeudPalindrome n)
"Recuperation"

Parameters:
resultat - (Vector)
tabPal - (Palindrome1cible[]
n - (NoeudPalindrome)
See Also:
tous_les_palindromes(), Palindrome1cible.fusion_Palindrome(Palindrome1cible[], Palindrome1cible[])

les_feuilles

public java.util.Vector les_feuilles()
Leaves of the root node.

Returns:
(Vector) Vector of NoeudPalindrome's
See Also:
ADN1cible.calcul_Resultat(ADN1test[], int, boolean, boolean)

les_feuilles

private static void les_feuilles(java.util.Vector feuilles,
                                 NoeudPalindrome n)
Leaves of the given node are put in the Vector.

Parameters:
feuilles - (Vector) Vector of NoeudPalindrome's
n - (NoeudPalindrome) root of the tree
See Also:
les_feuilles()