Overview Schemas Index

MATHEMATICAL_FUNCTIONS_SCHEMA (jsdai.SMathematical_functions_schema)


FUNCTION shape_of_array
          (func : maths_function) : LIST [0:?] OF positive_integer;

 LOCAL tspace : tuple_space ; temp : maths_space ; result : LIST OF positive_integer := [ ] ; END_LOCAL ; IF  ( schema_prefix + 'explicit_table_function' ) IN  TYPEOF  ( func ) THEN  RETURN  ( func \ explicit_table_function . shape ) ; END_IF  ; tspace := func . domain ; IF  ( space_dimension ( tspace ) = 1 ) AND ( ( schema_prefix + 'tuple_space' ) IN  TYPEOF  ( factor1 ( tspace ) ) ) THEN  tspace := factor1 ( tspace ) ; END_IF  ; REPEAT i := 1 TO space_dimension ( tspace ) ; temp := factor_space ( tspace , i ) ; IF NOT ( ( schema_prefix + 'finite_integer_interval' ) IN TYPEOF ( temp ) ) THEN RETURN  ( ? ) ; END_IF ; INSERT ( result , temp \ finite_integer_interval . size , i - 1 ) ; END_REPEAT ; RETURN ( result ) ; 

END_FUNCTION; -- shape_of_array

public class FShape_of_array
          public static Value run(SdaiContext _context, Value func)