IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

avec Java Discussion :

Ajout dans une liste


Sujet :

avec Java

  1. #1
    Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Novembre 2008
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 34

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2008
    Messages : 143
    Points : 60
    Points
    60
    Par défaut Ajout dans une liste
    Salut a tous ,
    voici un bout de code de mon programme
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
     
     
       // for every attribute not mentioned in the rule
                enumAtt = ruleE.enumerateAttributes();
                while (enumAtt.hasMoreElements()) 
                {
     
                     Attribute attr = (Attribute) enumAtt.nextElement();
                     if (isMentionedIn(attr, r.m_test)) {continue;}
                     int M = attr.numValues();
                     for (int val = 0; val < M; val ++) // ... for each value of this attribute
                     {
                    PrismRule cr = addRule(null , new PrismRule(data, r.m_classification));
     
                    for(int l=0 ; l< r.testSet.size();l++){ cr.testSet.add( r.testSet.get(l));   }      
     
     
                              Test Tst3 =new Test() ;
                              Tst3.m_attr=attr.index();
                              Tst3.m_val=val;
     
                              cr.testSet.add(Tst3);
     
     
     
     
     
     
     
     
     
     
     
     
        if(cr.testSet.size()==1) {  cr.m_test = cr.testSet.get(0);}
        else if (cr.testSet.size()>1 ) { // il faut au moins 2 règles pour qu'il y ait un lien entre règles
          cr.m_test = cr.testSet.get(0);
     
          Test g=cr.m_test;
     
           for(int i=1; i<cr.testSet.size(); i++) { // on commence à la 2ème règle dans la liste (la première c'est previous);
     
          g.m_next =cr.testSet.get(i); // la suivante de previous, c'est la règle courante de l'itération
     
     
          g=g.m_next; // la nouvelle règle qu'on va traiter l'itération suivante, est la suivante de celle qu'on vient de traiter.
     
           }
       } 
     
    System.out.println("regle added  ====  "+cr);
       CR.add(cr);
     
     
     
     
                     }
     
     
     
                }
     
     
     
     
     
     
     
     
     
     
                for(int m=0;m<CR.size();m++){System.out.println("regle num ["+m+"]==== "+CR.get(m));}
     
           List<PrismRule> CR1= new ArrayList<PrismRule>();
           CR1=CR;
     
     
     
     
      System.out.print("les regle "+CR.get(4).toString());
      return  CR ;
       }
    la ligne
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    System.out.println("regle added  ====  "+cr);
    me donne :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
     regle added  ====  If length = small
       and color = Red then True
     
    regle added  ====  If length = small
       and color = Green then True
     
    regle added  ====  If length = small
       and color = Blue then True
     
    regle added  ====  If length = small
       and age = young then True
     
    regle added  ====  If length = small
       and age = old then True
     
    regle added  ====  If length = small
       and neighbors = 1 then True
     
    regle added  ====  If length = small
       and neighbors = 2-to-4 then True
     
    regle added  ====  If length = small
       and neighbors = 5-to-9 then True
     
    regle added  ====  If length = small
       and neighbors = more-than-10 then True
    par contre la ligne
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
                for(int m=0;m<CR.size();m++){System.out.println("regle num ["+m+"]==== "+CR.get(m));}
    m'affiche :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    regle num [0]==== If length = small
       and neighbors = more-than-10 then True
     
    regle num [1]==== If length = small
       and neighbors = more-than-10 then True
     
    regle num [2]==== If length = small
       and neighbors = more-than-10 then True
     
    regle num [3]==== If length = small
       and neighbors = more-than-10 then True
     
    regle num [4]==== If length = small
       and neighbors = more-than-10 then True
     
    regle num [5]==== If length = small
       and neighbors = more-than-10 then True
     
    regle num [6]==== If length = small
       and neighbors = more-than-10 then True
     
    regle num [7]==== If length = small
       and neighbors = more-than-10 then True
     
    regle num [8]==== If length = small
       and neighbors = more-than-10 then True
     
    les regle If length = small
       and neighbors = more-than-10 then True
    je comprend pas pourquoi , car en princice CR qui est la liste "afficher en 2eme position" n'est que les cr "afficher en 1ere position" collecter ,
    pourqoi CR ne contient que la derniere cr calculer !!!!

  2. #2
    Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Novembre 2008
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 34

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2008
    Messages : 143
    Points : 60
    Points
    60
    Par défaut
    voila le code apres un essai de le rendre un peu plus clair
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    // for every attribute not mentioned in the rule  r
                enumAtt = ruleE.enumerateAttributes();
                while (enumAtt.hasMoreElements())  
                {
     
                     Attribute attr = (Attribute) enumAtt.nextElement();
                     if (isMentionedIn(attr, r.m_test)) {continue;} // if the attribute is already in rule r skip  it
                     int M = attr.numValues();
                     for (int val = 0; val < M; val ++) // ... for each value of this attribute
                     {
     
    				         // create a new condition of type Test
    				          Ts3=creatCondition(attr,val);
    						  PrismRule cr = addRule(null , new PrismRule(data, r.m_classification)); // create a new empty candidate rule cr
                              for(int l=0 ; l< r.testSet.size();l++){ cr.testSet.add( r.testSet.get(l));  } //add to this new condidate rule all conditions in rule r     
                              cr.testSet.add(Tst3); // add the new condition to set of conditions of the rule cr
                               // we cast the testSet which is a list to m_test which is type Test 
     
     
                               System.out.println("regle added  ====  "+cr); // print this new cr
                               CR.add(cr);  // add this new candidate rule to the list CR
     
                     }// end the for of the values
     
                } // end the while of attributes enumeration
     
     
                // i print the elements of the list CR "which are new cr created for each value of each attribute"
                for(int m=0;m<CR.size();m++){System.out.println("regle num ["+m+"]==== "+CR.get(m));}
     
      return  CR ;
       }

  3. #3
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    Tu peux remplacer

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    System.out.println("regle added  ====  "+cr)
    par

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    System.out.println("regle added: "+System.identityHashCode(cr)+" ====  "+cr)
    Je soupconne que ta méthode addrule retourne toujours la même instance, qu'elle se content de modifier.

  4. #4
    Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Novembre 2008
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 34

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2008
    Messages : 143
    Points : 60
    Points
    60
    Par défaut
    je l'ai faite et voila ce que j'ai obtenu
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
     
     
    regle added: 2128830893 ====  If length = small
       and color = Red then True
     
    regle added: 35775984 ====  If length = small
       and color = Green then True
     
    regle added: 2139025575 ====  If length = small
       and color = Blue then True
     
    regle added: 1726588245 ====  If length = small
       and age = young then True
     
    regle added: 1969595451 ====  If length = small
       and age = old then True
     
    regle added: 1677810099 ====  If length = small
       and neighbors = 1 then True
     
    regle added: 346565136 ====  If length = small
       and neighbors = 2-to-4 then True
     
    regle added: 744590088 ====  If length = small
       and neighbors = 5-to-9 then True
     
    regle added: 938397947 ====  If length = small
       and neighbors = more-than-10 then True
    et j'ai remplacer aussi
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
                for(int m=0;m<CR.size();m++){System.out.println("regle num ["+m+"]==== "+CR.get(m));}
    par
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     for (int m = 0; m < CR.size(); m++) {
               System.out.println("regle num [" + m + "]==== "+System.identityHashCode(CR.get(m))+" =====" + CR.get(m));
           }
    et voila le resultat
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
     
    regle num [0]==== 2139025575 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [1]==== 1726588245 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [2]==== 1969595451 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [3]==== 1677810099 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [4]==== 346565136 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [5]==== 744590088 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [6]==== 938397947 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [7]==== 534391661 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [8]==== 744034673 =====If length = small
       and neighbors = more-than-10 then True

  5. #5
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    CR est de quel type?? parce que entre les instance que tu passe à get et les instance que tu passe à add, ce ne sont plus les même instances

    Où alors tes deux outputs ne correspondent pas au même run?


    En supposant que les instances sont les même et que CR est un List de base java, il faudra aller splus en détail. Par exemple, cet objet data que tu passe à new PrismRule, ce serait pas toujours la même instance? Si new PrismRule n'en fait pas de copie, alors toutes les instances partageront la même data, qui est l'état final.

  6. #6
    Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Novembre 2008
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 34

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2008
    Messages : 143
    Points : 60
    Points
    60
    Par défaut
    CR
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
      public List<PrismRule> CR = new ArrayList<PrismRule>();
    et
    cr
    excuse mais ,je n'ai pas bien compris cela

    En supposant que les instances sont les même et que CR est un List de base java, il faudra aller splus en détail. Par exemple, cet objet data que tu passe à new PrismRule, ce serait pas toujours la même instance? Si new PrismRule n'en fait pas de copie, alors toutes les instances partageront la même data, qui est l'état final.
    comment je peux savoir si l'objet data que je passe à new PrismRule n'est pas toujours la même instance

  7. #7
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    ben tu vérifie, tu affiche le identityHashCode, tu regarde ton code. Il y a beaucoup de chose qu'on ne sais pas avec ton code, mais visiblement, tes PrismRule partagent tous le même état. Il faut en chercher la cause.

  8. #8
    Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Novembre 2008
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 34

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2008
    Messages : 143
    Points : 60
    Points
    60
    Par défaut
    J'ai essayer d'ajouter Cloneable to PrismRule et j'ai fai
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
                   }
    System.out.println("regle added: "+System.identityHashCode(cr)+" ====  "+cr);
     
    PrismRule crn = ( PrismRule ) cr.clone();
    CR.add(crn);
    avant de fair add a cr je fait une copy de cr qui est crn et je fait addmais ça donne tour la même execution

  9. #9
    Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Novembre 2008
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 34

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2008
    Messages : 143
    Points : 60
    Points
    60
    Par défaut
    voila le code de ma PrismRule j'ai enlever le code des methode pour que ça soit plus cout
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
     
     
     
     private class PrismRule implements Serializable, RevisionHandler, Cloneable {
     
        private int m_classification;/** The classification */	
        private int m_ruleSize=0;/** The classification */
        private Instances m_instances;/** The instance */
        private Test m_test;/** First test of this rule */ 
        private int m_errors;/** Number of errors made by this rule (will end up 0) */
        private PrismRule m_next;/** The next rule in the list */
        private double m_Laplace;/** accuracy metrics */
        private double m_Confidence;
        private double m_Infogain;
        private double m_Infocontent;
    	public List<Test> testSet  = new ArrayList<Test>(); /** The next rule in the list */
     
     
        public PrismRule(Instances data, int cl) throws Exception {
     
          m_instances = data;
          m_classification = cl;
          m_test = null;
          m_next = null;
          m_errors = 0;
          m_Laplace=0;
          m_Confidence=0;
          m_Infogain=0;
          m_Infocontent=0;
          Enumeration enu = data.enumerateInstances();
          while (enu.hasMoreElements()) {
            if ((int) ((Instance) enu.nextElement()).classValue() != cl) {
    	  m_errors++;
    	                                                                                }
                                                     }
          m_instances = new Instances(m_instances, 0);
        }  
     
     
        protected Object clone() throws CloneNotSupportedException {
            return super.clone();
        } 
     
        public int resultRule(Instance inst) { }
        public boolean coveres(Instance data) { }
        public int resultRules(Instance inst) { }
        public Instances coveredBy(Instances data) { }
        public Instances notCoveredBy(Instances data) {}
     
      }
    est ce que le fait qu'elle soit serializable peut engendrer ce type de probleme ?

  10. #10
    Expert éminent sénior
    Avatar de tchize_
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Avril 2007
    Messages
    25 481
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 44
    Localisation : Belgique

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Avril 2007
    Messages : 25 481
    Points : 48 806
    Points
    48 806
    Par défaut
    tu peux montrer le toString, que jevoies d'ou viennent les données que tu affiche.

    Aussi, dans ta boucle, ce data, il sort d'ou?
    Que fait la méthode addRule() ?

  11. #11
    Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Novembre 2008
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 34

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2008
    Messages : 143
    Points : 60
    Points
    60
    Par défaut
    Method toString
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
     public String toString() {
     
          try {
    	StringBuffer text = new StringBuffer();
    	if (m_test != null) {
    	  text.append("If ");
    	  for (Test t = m_test; t != null; t = t.m_next) {
    	    if (t.m_attr == -1) {
    	      text.append("?");
    	    } else {
     
     
    	      text.append(m_instances.attribute(t.m_attr).name() + " = " +
    			  m_instances.attribute(t.m_attr).value(t.m_val));
    	    }
    	    if (t.m_next != null) {
    	      text.append("\n   and ");
    	    }
    	  }
    	  text.append(" then ");
    	}
    	text.append(m_instances.classAttribute().value(m_classification) + "\n");
    	if (m_next != null) {
     
    	  text.append(m_next.toString());
    	}
    	return text.toString();
          } catch (Exception e) {
    	return "Can't print Prism classifier!";
          }
        }
    Ma method Add1 :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
     private List<PrismRule> Add1(PrismRule r, Instances data) throws Exception {
    elle a comme parametre r qui est une PrismRule , data c'est un ensemles d'instances , ma methode add doit me generer une liste de regles ( chaque regle c'est r (passé en paramètre) mais on l'ajout une condition en plus (attr,val) par exemple
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    r : if age = young then true
    add1 va me generer
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     if age = young and color =blue then true 
    if age = young and color =red then true 
    if age = young and color =yellow then true

  12. #12
    Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Novembre 2008
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 34

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2008
    Messages : 143
    Points : 60
    Points
    60
    Par défaut
    addRule ()
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
     
     
    private PrismRule addRule(PrismRule lastRule, PrismRule newRule) {
     
        if (lastRule == null) {
          m_rules = newRule;
        } else {
          lastRule.m_next = newRule;
        }
     
        return newRule;
      }
    je peux ecrire seulement :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
     PrismRule cr =  new PrismRule(data, r.m_classification);
    a la place de
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
     PrismRule cr = addRule(null, new PrismRule(data, r.m_classification));
    car j'ai null

  13. #13
    Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Novembre 2008
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 34

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2008
    Messages : 143
    Points : 60
    Points
    60
    Par défaut
    J'ai essayer de donner une empty rule r (sans condition) c-a-d dans ce code la
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
     
     
        if(cr.testSet.size()==1) {  cr.m_test = cr.testSet.get(0);}
        else if (cr.testSet.size()>1 ) { // il faut au moins 2 règles pour qu'il y ait un lien entre règles
          cr.m_test = cr.testSet.get(0);
     
          Test g=cr.m_test;
     
           for(int i=1; i<cr.testSet.size(); i++) { // on commence à la 2ème règle dans la liste (la première c'est previous);
     
          g.m_next =cr.testSet.get(i); // la suivante de previous, c'est la règle courante de l'itération
     
     
          g=g.m_next; // la nouvelle règle qu'on va traiter l'itération suivante, est la suivante de celle qu'on vient de traiter.
     
           }
       }
    il va entrer dans le premier if et çà me donne ce que je désire

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
     
     
    --------------Start build------------------
    regle added: 253286993 ====  If length = long then True
     
    regle added: 681902997 ====  If length = small then True
     
    regle added: 1770930187 ====  If length = medium then True
     
    regle added: 2047789136 ====  If color = Red then True
     
    regle added: 1619081930 ====  If color = Green then True
     
    regle added: 1144706373 ====  If color = Blue then True
     
    regle added: 1921501185 ====  If age = young then True
     
    regle added: 811332709 ====  If age = old then True
     
    regle added: 1695165360 ====  If neighbors = 1 then True
     
    regle added: 2126144418 ====  If neighbors = 2-to-4 then True
     
    regle added: 2128830893 ====  If neighbors = 5-to-9 then True
     
    regle added: 35775984 ====  If neighbors = more-than-10 then True
     
    regle num [0]==== 253286993 =====If length = long then True
     
    regle num [1]==== 681902997 =====If length = small then True
     
    regle num [2]==== 1770930187 =====If length = medium then True
     
    regle num [3]==== 2047789136 =====If color = Red then True
     
    regle num [4]==== 1619081930 =====If color = Green then True
     
    regle num [5]==== 1144706373 =====If color = Blue then True
     
    regle num [6]==== 1921501185 =====If age = young then True
     
    regle num [7]==== 811332709 =====If age = old then True
     
    regle num [8]==== 1695165360 =====If neighbors = 1 then True
     
    regle num [9]==== 2126144418 =====If neighbors = 2-to-4 then True
     
    regle num [10]==== 2128830893 =====If neighbors = 5-to-9 then True
     
    regle num [11]==== 35775984 =====If neighbors = more-than-10 then True
    je pense que le problème est dans le deuxième if !!

  14. #14
    Membre du Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Novembre 2008
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 34

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Novembre 2008
    Messages : 143
    Points : 60
    Points
    60
    Par défaut
    J'ai fait un hachCode sur le g et voila ce j'ai obtenu:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
     
     
    g = 1969595451
    regle added: 1677810099 ====  If length = small
       and color = Red then True
     
    g = 1969595451
    regle added: 346565136 ====  If length = small
       and color = Green then True
     
    g = 1969595451
    regle added: 744590088 ====  If length = small
       and color = Blue then True
     
    g = 1969595451
    regle added: 938397947 ====  If length = small
       and age = young then True
     
    g = 1969595451
    regle added: 534391661 ====  If length = small
       and age = old then True
     
    g = 1969595451
    regle added: 744034673 ====  If length = small
       and neighbors = 1 then True
     
    g = 1969595451
    regle added: 193472630 ====  If length = small
       and neighbors = 2-to-4 then True
     
    g = 1969595451
     
    regle added: 404250852 ====  If length = small
       and neighbors = 5-to-9 then True
     
    g = 1969595451
    regle added: 1753294103 ====  If length = small
       and neighbors = more-than-10 then True
     
    regle num [0]==== 1677810099 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [1]==== 346565136 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [2]==== 744590088 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [3]==== 938397947 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [4]==== 534391661 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [5]==== 744034673 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [6]==== 193472630 =====If length = small
       and neighbors = more-than-10 then True
     
    regle num [7]==== 404250852 =====If length = small
        and neighbors = more-than-10 then True
     
    regle num [8]==== 1753294103 =====If length = small
       and neighbors = more-than-10 then True

Discussions similaires

  1. Réponses: 3
    Dernier message: 26/08/2006, 14h03
  2. Ajout dans une liste déroulante
    Par auriolbeach dans le forum Access
    Réponses: 5
    Dernier message: 16/02/2006, 05h37
  3. Ajout dans une liste avec un bouton
    Par Invité dans le forum Access
    Réponses: 6
    Dernier message: 07/12/2005, 08h27
  4. Ajout dans une liste/vérification
    Par illight dans le forum Access
    Réponses: 1
    Dernier message: 11/10/2005, 17h12
  5. [LG]probleme d'ajout dans une liste chainée...
    Par misteryann dans le forum Langage
    Réponses: 5
    Dernier message: 08/03/2004, 20h28

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo