Le 13/08/2012 15:43, Loic GASCHE a écrit :
le code tardant à arriver j'ai pu faire une verification en demandant la submatrix sur la dimension 1... qui est bien celle des groupes (et pas la 2 comme j'avais mis avant).
La matrice a bien 2 dimensions: MatrixND tfgMatrix = MatrixFactory.getInstance().create( ResultName.MATRIX_FISHING_MORTALITY_PER_GROUP, new List[]{populations, groups}, // On travaille sur les pops ET les groupes new String[]{n_("Population"), n_("Group")}); Donc dimension 0 et 1.
ce coup-ci le message est : java.util.NoSuchElementException: L'objet passé en argument n'a pas été retrouvé ou la dimension donnée ne convient pas:3.0 in [Plaice7D Groupe 0, Plaice7D Groupe 1, Plaice7D Groupe 2, Plaice7D Groupe 3, Plaice7D Groupe 4, Plaice7D Groupe 5, Plaice7D Groupe 6, Plaice7D Groupe 7, Plaice7D Groupe 8, Plaice7D Groupe 9]
Normal... il n'arrive pas à trouver 3.0 dans les noms de groupes...
tfmMatrix = tfmMatrix.getSubMatrix(2, AgeMin, Nbre); La c'est un problème différent. Il y a deux methodes dans matrix pour avoir une sous matrice: - getSubMatrix(int, int, int) : par indice de semantique - getSubMatrix(int, Object, int) : par valeur de semantique Dans ton cas, il appelle la deuxième d'où l'erreur. A quoi correspond ageMin exactement ? -- Éric Chatellier <chatellier@codelutin.com> Tel: 02.40.50.29.28 http://www.codelutin.com