(* SCHEMA mathematical_functions_schema; *)
FUNCTION factor_space(tspace : tuple_space;
idx : positive_integer) : maths_space;
LOCAL
typenames : SET OF STRING := TYPEOF (tspace);
END_LOCAL;
IF (schema_prefix + 'UNIFORM_PRODUCT_SPACE') IN typenames THEN
IF idx <= tspace\uniform_product_space.exponent THEN
RETURN (tspace\uniform_product_space.base);
END_IF;
RETURN (?);
END_IF;
IF (schema_prefix + 'LISTED_PRODUCT_SPACE') IN typenames THEN
IF idx <= SIZEOF (tspace\listed_product_space.factors) THEN
RETURN (tspace\listed_product_space.factors[idx]);
END_IF;
RETURN (?);
END_IF;
IF (schema_prefix + 'EXTENDED_TUPLE_SPACE') IN typenames THEN
IF idx <= space_dimension (tspace\extended_tuple_space.base) THEN
RETURN (factor_space (tspace\extended_tuple_space.base, idx));
END_IF;
RETURN (tspace\extended_tuple_space.extender);
END_IF;
-- Should not be reachable.
RETURN (?);
END_FUNCTION; -- factor_space
|
Generated by STEP Tools® EXPRESS to HTML Converter
2012-03-27T17:13:59-04:00