Des factures rouges ? Nous vous les transformons en vertes. Les bénéfices sont d'abord virés sur votre carte bancaire — nous partageons ensuite. Aucun prépaiement, aucun accès au compte requis. 🟢 WhatsApp : 85254981192 ⚪ Telegram : @kkk437
Échange les lignes d'une matrice.
bool matrix::SwapRows( const ulong row1, // indice de la première ligne const ulong row2 // indice de la deuxième ligne );
Paramètres
row1
[in] Indice de la première ligne.
row2
[in] Indice de la deuxième ligne.
Valeur de Retour
Renvoie true en cas de succès, false sinon.
Exemple
matrix matrix_a={{1,2,3,4}, {5,6,7,8}, {9,10,11,12}, {13,14,15,16}}; matrix matrix_i=matrix::Identity(4,4); matrix matrix_a1=matrix_a; matrix_a1.SwapRows(0,3); Print("matrix_a1\n",matrix_a1); matrix matrix_p=matrix_i; matrix_p.SwapRows(0,3); matrix matrix_c1=matrix_p.MatMul(matrix_a); Print("matrix_c1\n",matrix_c1); /* matrix_a1 [[13,14,15,16] [5,6,7,8] [9,10,11,12] [1,2,3,4]] matrix_c1 [[13,14,15,16] [5,6,7,8] [9,10,11,12] [1,2,3,4]] */