|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--algod.SommetAbstract | +--algod.SommetIO | +--algod.SommetElection | +--algod.SommetArbreCouvrant | +--algod.SommetNumProfondeur | +--algod.SommetColoration | +--algod.SommetColorationAsynch1
Coloration avec parallélisme (colorations secondaires).
Field Summary | |
protected AlgoDMessageFIFO |
algoDMessageFIFO
File d'attente des messages provenant d'autres sommets. |
(package private) static boolean |
backtrack_optimise
Utilise la méthode de backtrack optimisée : remontée au plus petit voisin plus grand que soi. |
(package private) BooleanVector |
booleanVector
Table des couleurs utilisées par les voisins plus forts. |
(package private) static boolean |
colorationAsynch1
Utilisation de la coloration parallèle secondaire. |
private boolean |
coloreParJeton
Indique si le sommet a une couleur officielle. |
(package private) int |
couleur
Couleur de ce sommet pour les problèmes de coloration. |
protected int |
couleurMax
Couleur maximum pour ce sommet. |
(package private) int |
identElu
Identifiant du sommet élu. -1 si pas encore élu. |
protected int |
identifiant
Identifiant unique de ce sommet. |
(package private) static int |
nbBackTrack
Compteur de back-tracks. |
(package private) static int |
nbBackTrack_SJ
Nombre de back-tracks secondaires. |
(package private) static int |
nbMessagesArbreCouvrant
|
(package private) static int |
nbMessagesColoration
Compteur de messages pour la coloration. |
(package private) static int |
nbMessagesColoration_SJ
Nombre de messages pour la coloration secondaire. |
(package private) static int |
nbMessagesElection
|
(package private) static int |
nbMessagesNumProfondeur
|
(package private) int |
numVoisinParent
Numéro du voisin qui fait parent. |
protected int |
poids
Poids de ce noeud de l'arbre recouvrant, c'est-à-dire le nombre de sommets enfants et petit-enfants, etc... |
(package private) IntVector |
poidsEnfants
Tableau stoquant les poids des différents enfants. |
(package private) static int |
rndDelaiTransmission
|
(package private) IntVector |
route
Tableau indiquant, pour les sommets supposés du graphe, le voisin qui relaie la communication. |
static boolean |
verbose
Indique si un texte doit apparaître lors de certaines actions comme l'envoit de messages. |
(package private) boolean |
voisinsTrackConnus
Indique si le routage pour le back-track a déjà été recherché. |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
SommetColorationAsynch1(int couleurMax,
int identifiant)
|
Method Summary | |
(package private) void |
acteCandidature()
Démarre un acte de candidature. |
(package private) void |
affiche(java.lang.String texte)
Affiche du texte sur la sortie standard. |
(package private) void |
afficheErreur(java.lang.String texte)
Affiche du texte sur la sortie standard. |
protected int |
ajoutVoisin(AlgoDMessageFIFO aAlgoDMessageFIFO,
int aIdentifiant)
Ajoute un voisin à ce sommet. |
protected int |
ajoutVoisin(SommetVoisin unSommet)
Ajoute un voisin à ce sommet. |
(package private) void |
attend(long millis)
Attend un certain nombre de millisecondes. |
(package private) void |
chercheRoutesBackTrack()
Recherche les routes pour le back-track. |
private void |
colorationRattee_SJ()
|
private void |
colorationRattee()
On ne peut pas se colorer, on back-traque. |
void |
demarreArbreCouvrant()
A appeler pour démarrer l'algorithme distribué d'arbre couvrant à partir de ce sommet. |
protected void |
demarreColoration()
|
protected void |
demarreElection()
|
void |
demarreNumProfondeur()
|
void |
destroy()
Arrête le thread et nettoie ses structures et moyens de communication. |
(package private) void |
envoyerABackTrack(char typeMessage,
java.lang.String contenu,
int identSommetSource)
Envoie un message au sommet précédent dans le backtrack. |
(package private) void |
envoyerABackTrackFini(char typeMessage,
java.lang.String contenu,
int identSommetSource)
Envoie un message de fin de back-track réussi. |
void |
envoyerAEnfant(char typeMessage,
java.lang.String contenu,
int identSommetSource,
int numEnfant)
Envoie un message à un enfant. |
(package private) void |
envoyerAEnfantsPasTrack(char typeMessage,
java.lang.String contenu,
int identSommetSource)
|
void |
envoyerAPere(char typeMessage,
java.lang.String contenu,
int identSommetSource)
Envoie un message au père de ce sommet dans l'arbre couvrant. |
(package private) void |
envoyerASommet(char typeMessage,
java.lang.String contenu,
int identSommetSource,
SommetVoisin sommetVoisin)
|
(package private) void |
envoyerASommet(char typeMessage,
java.lang.String contenu,
int identSommetSource,
SommetVoisin sommetVoisin,
int identSommetDestination)
|
protected void |
envoyerATousVoisins(char typeMessage,
java.lang.String contenu,
int identSommetSource)
Envoie un message à tous les voisins. |
protected void |
envoyerATousVoisinsSauf(char typeMessage,
java.lang.String contenu,
int identSommetSource,
int numVoisin)
Envoie un message à tous les voisins sauf un. |
(package private) void |
envoyerATrack(char typeMessage,
java.lang.String contenu,
int identSommetSource)
Envoie un message au sommet suivant dans le backtrack. |
void |
envoyerAuxEnfants(char typeMessage,
java.lang.String contenu,
int identSommetSource)
Envoie un message aux enfants de ce sommet dans l'arbre couvrant. |
void |
envoyerAuxFaibles(char typeMessage,
java.lang.String contenu,
int identSommetSource)
Envoie un message aux voisins plus faibles. |
void |
envoyerAuxForts(char typeMessage,
java.lang.String contenu,
int identSommetSource)
Envoie un message aux voisins plus forts. |
protected void |
envoyerAVoisin(char typeMessage,
java.lang.String contenu,
int identSommetSource,
int numVoisin)
|
protected void |
envoyerAVoisin(char typeMessage,
java.lang.String contenu,
int identSommetSource,
int numVoisin,
int identSommetDestination)
Envoie un message de type typeMessage, provenant du sommet identSommetSource que l'on achemine par le voisin numVoisin pour le sommet identSommetDestination. |
protected void |
finArbreCouvrant()
Termine la méthode héritée de fin d'arbre couvrant pour démarrer la numérotation en profondeur. |
protected void |
finColoration(boolean ok)
Méthode invoquée lorsque l'algorithme de coloration est terminé. |
protected void |
finElection()
Termine la méthode héritée de fin d'élection pour démarrer l'arbre couvrant. |
protected void |
finNumProfondeur()
Termine la méthode héritée de numérotation en profondeur pour démarrer la coloration. |
int |
getCouleur()
Accès à la couleur de ce sommet. |
(package private) int |
getCouleurMaxPossible()
|
SommetVoisin |
getEnfant(int ident)
|
SommetVoisin |
getEnfantAt(int num)
|
int |
getIdentifiant()
Accès à l'identifiant de ce sommet. |
int |
getIdentifiantProfondeur()
Accés au nouvel identifiant après l'arbre couvrant, qui correspond à une numérotation en profondeur inversée. |
SommetVoisin |
getPere()
Accés au père de ce sommet. |
SommetVoisin |
getVoisin(int ident)
|
SommetVoisin |
getVoisinAt(int num)
|
int |
indexOfEnfant(int ident)
|
protected void |
initialisationElection(int nbSomm)
|
boolean |
isCouleurOfficielle()
|
boolean |
isElu()
Retourne si ce sommet est l'élu de son groupe. |
boolean |
isFeuille()
Indique si ce sommet est une feuille de l'arbre couvrant. |
boolean |
isFilsDe(int idPere)
Indique si ce sommet est un fils du sommet de cet identifiant. |
boolean |
isFini()
Indique que le sommet n'a plus de message à traiter dans la file d'attente. |
boolean |
isRacine()
Indique si ce sommet est la racine de l'arbre couvrant. |
boolean |
isVoisin(int ident)
Teste si un sommet est voisin de celui-ci. |
int |
nbEnfants()
|
int |
nbVoisins()
|
int |
numOfVoisin(int ident)
|
private void |
receptionColoration_SJ(int numVoisin,
int colore)
|
private void |
receptionColoration(int numVoisin,
int colore)
Un voisin nous transmet sa nouvelle couleur. |
private void |
receptionDemarre_SJ(int identSource,
int colore,
int identDest)
|
private void |
receptionDemarre(int identSource,
int identDest)
Un voisin (normalement notre père dans l'arbre couvrant), nous transmet sa couleur et nous demande de nous colorer. |
private void |
receptionNON_SJ(int identSource,
int identDest)
|
private void |
receptionNON(int identSource,
int identDest)
|
private void |
receptionOK_SJ(int identSource)
|
private void |
receptionOK(int identSource)
Le back-track s'est terminé et il est réussi. |
void |
recevoir(AlgoDMessage adm)
Ajoute un message provenant d'un autre sommet à la file des messages. |
(package private) void |
setCouleursVoisinsSupp()
Désactive les couleurs utilisées parmis les voisins d'identifiant supérieur. |
(package private) void |
sonnerie()
Fait un beep |
java.lang.String |
toString()
Informations sur ce sommet. |
protected void |
traiteReception(AlgoDMessage adm,
int numVoisin)
Appelle les méthodes appropriées en fonction du message à traiter aprés un parsage éventuel. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
static boolean colorationAsynch1
static int nbBackTrack_SJ
static int nbMessagesColoration_SJ
private boolean coloreParJeton
static int nbBackTrack
static int nbMessagesColoration
static boolean backtrack_optimise
int couleur
protected final int couleurMax
BooleanVector booleanVector
boolean voisinsTrackConnus
static int nbMessagesNumProfondeur
static int nbMessagesArbreCouvrant
int numVoisinParent
protected int poids
IntVector poidsEnfants
static int nbMessagesElection
IntVector route
int identElu
SommetElection.maxIdent
,
SommetElection.maxNbVoisins
static int rndDelaiTransmission
protected AlgoDMessageFIFO algoDMessageFIFO
public static boolean verbose
protected final int identifiant
Constructor Detail |
public SommetColorationAsynch1(int couleurMax, int identifiant)
Method Detail |
public final boolean isCouleurOfficielle()
protected void demarreColoration()
demarreColoration
in class SommetColoration
protected void traiteReception(AlgoDMessage adm, int numVoisin)
SommetIO
traiteReception
in class SommetColoration
private void receptionColoration(int numVoisin, int colore)
private void receptionColoration_SJ(int numVoisin, int colore)
private void receptionOK(int identSource)
private void receptionOK_SJ(int identSource)
private void receptionNON(int identSource, int identDest)
private void receptionNON_SJ(int identSource, int identDest)
private void receptionDemarre(int identSource, int identDest)
private void receptionDemarre_SJ(int identSource, int colore, int identDest)
private void colorationRattee()
private void colorationRattee_SJ()
public void destroy()
SommetAbstract
destroy
in class SommetArbreCouvrant
public final int getCouleur()
public final void envoyerAuxForts(char typeMessage, java.lang.String contenu, int identSommetSource)
public final void envoyerAuxFaibles(char typeMessage, java.lang.String contenu, int identSommetSource)
protected void finColoration(boolean ok)
SommetColoration.couleurMax
protected final void finNumProfondeur()
finNumProfondeur
in class SommetNumProfondeur
int getCouleurMaxPossible()
void setCouleursVoisinsSupp()
void chercheRoutesBackTrack()
final void envoyerABackTrack(char typeMessage, java.lang.String contenu, int identSommetSource)
final void envoyerAEnfantsPasTrack(char typeMessage, java.lang.String contenu, int identSommetSource)
final void envoyerATrack(char typeMessage, java.lang.String contenu, int identSommetSource)
final void envoyerABackTrackFini(char typeMessage, java.lang.String contenu, int identSommetSource)
public java.lang.String toString()
SommetAbstract
toString
in class SommetNumProfondeur
public final int getIdentifiantProfondeur()
public void demarreNumProfondeur()
protected final void finArbreCouvrant()
finArbreCouvrant
in class SommetArbreCouvrant
public final boolean isRacine()
public final boolean isFeuille()
public final boolean isFilsDe(int idPere)
public final int nbEnfants()
public final SommetVoisin getEnfantAt(int num)
num
- le numéro de l'enfant auquel on veut avoir accés.
public final SommetVoisin getPere()
public final SommetVoisin getEnfant(int ident)
ident
- l'identifiant du sommet enfant auquel on veut avoir accés.
public int indexOfEnfant(int ident)
ident
- l'identifiant du sommet enfant auquel on veut avoir accés.
public void demarreArbreCouvrant()
protected final void finElection()
finElection
in class SommetElection
public void envoyerAPere(char typeMessage, java.lang.String contenu, int identSommetSource)
public void envoyerAuxEnfants(char typeMessage, java.lang.String contenu, int identSommetSource)
public void envoyerAEnfant(char typeMessage, java.lang.String contenu, int identSommetSource, int numEnfant)
numEnfant
- le n° de l'enfant voisin à qui ce message est destiné.protected void initialisationElection(int nbSomm)
protected int ajoutVoisin(SommetVoisin unSommet)
SommetAbstract
ajoutVoisin
in class SommetAbstract
public final boolean isElu()
protected void demarreElection()
final void acteCandidature()
final void envoyerASommet(char typeMessage, java.lang.String contenu, int identSommetSource, SommetVoisin sommetVoisin, int identSommetDestination)
final void envoyerASommet(char typeMessage, java.lang.String contenu, int identSommetSource, SommetVoisin sommetVoisin)
protected final void envoyerAVoisin(char typeMessage, java.lang.String contenu, int identSommetSource, int numVoisin, int identSommetDestination)
protected final void envoyerAVoisin(char typeMessage, java.lang.String contenu, int identSommetSource, int numVoisin)
protected final void envoyerATousVoisins(char typeMessage, java.lang.String contenu, int identSommetSource)
protected final void envoyerATousVoisinsSauf(char typeMessage, java.lang.String contenu, int identSommetSource, int numVoisin)
numVoisin
- le numéro du voisin à ignorer (pas son identifiant).public final boolean isFini()
public final void recevoir(AlgoDMessage adm)
SommetIO.algoDMessageFIFO
public final int getIdentifiant()
public final boolean isVoisin(int ident)
ident
- identifiant du sommet potentiellement voisin de celui-ci.
public final SommetVoisin getVoisinAt(int num)
num
- le numéro du voisin auquel on veut avoir accés.
public final SommetVoisin getVoisin(int ident)
ident
- l'identifiant du voisin auquel on veut avoir accés.
public final int numOfVoisin(int ident)
ident
- l'identifiant d'un sommet voisin de ce sommet.
public final int nbVoisins()
protected final int ajoutVoisin(AlgoDMessageFIFO aAlgoDMessageFIFO, int aIdentifiant)
void affiche(java.lang.String texte)
void afficheErreur(java.lang.String texte)
void sonnerie()
final void attend(long millis)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |