public boolean valueEquals ( NDArrayDoubles other , double tolerance ) { if ( ! Arrays . equals ( dimensions , other . dimensions ) ) return false ; if ( dimensions . length != other . dimensions . length ) return false ; for ( int i = 0 ; i < dimensions . length ; i ++ ) { if ( Math . abs ( dimensions [ i ] - other . dimensions [ i ] ) > tolerance ) return false ; } return true ; }
Does a deep comparison using equality with tolerance checks against the vector table of values .