private pMat() as long private pNbCol as Long private pNbLigne as Long Public Property Get NbLigne() as Long NbLigne = pNbLigne End Property Public Property Get NbCol() as Long NbCol = pNbCol End Property Public sub Init(NbCol as long,NbLigne as Long) pNbCol = NbCol pNbLigne = NbLigne Redim pMat(1 To NbCol,1 To NbLigne) End Sub Public Function Transpose() As Matrice ' Code pour transposer une matrice End Function Public Function Inverse() As Matrice ' Code pour inverser une matrice End Function
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPublic Sub SetValue(L as long, C As Long, Valeur as Long) pMat(C,L) = Valeur End Sub ' Et cela pour relire la matrice bien sur ... Public function GetValue(L As Long, C As Long) As Long GetValue = pMat(C,L) End Function
Dim i as long, j as long Matryss.Init(10,10) For i = 1 to 10 For j = 1 to 10 Matryss.SetValue(i,j,0) Next Next