|
FUNCTION subspace_of_es (spc : maths_space, es : elementary_space_enumerators) : LOGICAL; LOCAL types : SET OF STRING := stripped_typeof ( spc ) ; END_LOCAL ; IF NOT EXISTS ( spc ) OR NOT EXISTS ( es ) THEN RETURN ( FALSE ) ; END_IF ; IF 'elementary_space' IN types THEN RETURN ( es_subspace_of_es ( spc \ elementary_space . space_id , es ) ) ; END_IF ; IF 'finite_space' IN types THEN RETURN ( all_members_of_es ( spc \ finite_space . members , es ) ) ; END_IF ; CASE es OF es_numbers : RETURN ( ( 'finite_integer_interval' IN types ) OR ( 'integer_interval_from_min' IN types ) OR ( 'integer_interval_to_max' IN types ) OR ( 'finite_real_interval' IN types ) OR ( 'real_interval_from_min' IN types ) OR ( 'real_interval_to_max' IN types ) OR ( 'cartesian_complex_number_region' IN types ) OR ( 'polar_complex_number_region' IN types ) ) ; es_complex_numbers : RETURN ( ( 'cartesian_complex_number_region' IN types ) OR ( 'polar_complex_number_region' IN types ) ) ; es_reals : RETURN ( ( 'finite_real_interval' IN types ) OR ( 'real_interval_from_min' IN types ) OR ( 'real_interval_to_max' IN types ) ) ; es_integers : RETURN ( ( 'finite_integer_interval' IN types ) OR ( 'integer_interval_from_min' IN types ) OR ( 'integer_interval_to_max' IN types ) ) ; es_logicals : RETURN ( FALSE ) ; es_booleans : RETURN ( FALSE ) ; es_strings : RETURN ( FALSE ) ; es_binarys : RETURN ( FALSE ) ; es_maths_spaces : RETURN ( FALSE ) ; es_maths_functions : RETURN ( 'function_space' IN types ) ; es_generics : RETURN ( TRUE ) ; END_CASE ; RETURN ( UNKNOWN ) ; END_FUNCTION; -- subspace_of_es |
|
public class FSubspace_of_es public static Value run(SdaiContext _context, Value spc, Value es) |