Jump to content

LU decomposition: Difference between revisions

m
Updated D entry
(Added BBC BASIC)
m (Updated D entry)
Line 686:
std.array, std.conv, std.string, std.range;
 
bool isRectangular(T)(in T[][] m) pure /*pure nothrow*/ {
//return all!(r => r.length == m[0].length)(m);
return !canFind!(r => r.length != m[0].length)(m);
}
 
bool isSquare(T)(in T[][] m) pure /*pure nothrow*/ {
return isRectangular(m) && m[0].length == m.length;
}
 
T[][] matrixMul(T)(in T[][] A, in T[][] B) /*pure*/ nothrow
in {
assert(A.length && B.length);
Cookies help us deliver our services. By using our services, you agree to our use of cookies.