|
FUNCTION compare_basis_and_coef (basis : LIST [1:?] OF b_spline_basis, coef : maths_function) : BOOLEAN; LOCAL shape : LIST OF positive_integer ; END_LOCAL ; IF NOT EXISTS ( basis ) OR NOT EXISTS ( coef ) THEN RETURN ( FALSE ) ; END_IF ; shape := shape_of_array ( coef ) ; IF NOT EXISTS ( shape ) THEN RETURN ( FALSE ) ; END_IF ; IF SIZEOF ( shape ) < SIZEOF ( basis ) THEN RETURN ( FALSE ) ; END_IF ; REPEAT i := 1 TO SIZEOF ( basis ) ; IF ( basis [ i ] . num_basis = shape [ i ] ) <> TRUE THEN RETURN ( FALSE ) ; END_IF ; END_REPEAT ; RETURN ( TRUE ) ; END_FUNCTION; -- compare_basis_and_coef |
|
public class FCompare_basis_and_coef public static Value run(SdaiContext _context, Value basis, Value coef) |