public static double normP ( DMatrixRMaj A , double p ) { if ( p == 1 ) { return normP1 ( A ) ; } else if ( p == 2 ) { return normP2 ( A ) ; } else if ( Double . isInfinite ( p ) ) { return normPInf ( A ) ; } if ( MatrixFeatures_DDRM . isVector ( A ) ) { return elementP ( A , p ) ; } else { throw new IllegalArgumentException ( "Doesn't support induced norms yet." ) ; } }
Computes either the vector p - norm or the induced matrix p - norm depending on A being a vector or a matrix respectively .