1.8 KiB
1.8 KiB
isSkewSymmetricMatrix
Test if a value is a skew-symmetric matrix.
Usage
var isSkewSymmetricMatrix = require( '@stdlib/assert/is-skew-symmetric-matrix' );
isSkewSymmetricMatrix( value )
Tests if a value is a skew-symmetric matrix.
var ndarray = require( '@stdlib/ndarray/ctor' );
var arr = ndarray( 'generic', [ 0, 1, -1, 0 ], [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
var bool = isSkewSymmetricMatrix( arr );
// returns true
Examples
var ndarray = require( '@stdlib/ndarray/ctor' );
var isSkewSymmetricMatrix = require( '@stdlib/assert/is-skew-symmetric-matrix' );
var arr = ndarray( 'generic', [ 0, -1, 1, 0 ], [ 2, 2 ], [ 2, 1 ], 0, 'row-major' );
var out = isSkewSymmetricMatrix( arr );
// returns true
out = isSkewSymmetricMatrix( [ 1, 2, 3, 4 ] );
// returns false
out = isSkewSymmetricMatrix( {} );
// returns false
out = isSkewSymmetricMatrix( null );
// returns false