Matrix multiplication အတြက္ algorithm

Matrix multiplication အတြက္ algorithm
==========
#matrix
Matrix ၂ခု ျဖစ္တဲ့ A နဲ႔ B က row, column N-by-N ရွိတယ္ ဆိုပါစို႔။ ဒါဆိုရင္ A နဲ႔ B ရဲ့ ေျမွာက္လဒ္ Matrix C ကို ရွာဖို႔ ေအာက္က နည္းလမ္းကို သံုးပါ။ (C=AB)
========
for (int i = 0; i < N; i++)
for (int j = 0; j < N; j++)
for (int k = 0; k < N; k++)
C[i][j] += A[i][k] * B[k][j];
========

Comments

Popular posts from this blog

Android Spinner (Drop Down) Example

ဒသမကိန္း (double) တခုကို ဒသမ ေနရာ ဘယ္ႏွစ္လံုးနဲ႔ အနီးဆံုး round တန္ဖိုး ျဖတ္ယူခ်င္ပါတယ္ ဆိုတာမ်ိဳး သံုးဖို႔ method တခု ေရးေပးလိုက္ပါတယ္။

String တခုရဲ့ permutation ကို ရွာေပးတဲ့ class