FUNCTION derive_definite_integral_domain
(* SCHEMA mathematical_functions_schema; *)
FUNCTION derive_definite_integral_domain(igrl : definite_integral_function)
: tuple_space;
-- Internal utility function:
FUNCTION process_product_space(spc : product_space;
idx, prefix : INTEGER;
vdomn : maths_space) : product_space;
LOCAL
uspc : uniform_product_space;
expnt : INTEGER;
factors : LIST OF maths_space;
END_LOCAL;
IF (schema_prefix + 'UNIFORM_PRODUCT_SPACE') IN TYPEOF (spc) THEN
uspc := spc;
expnt := uspc.exponent + prefix;
IF idx <= uspc.exponent THEN expnt := expnt - 1; END_IF;
IF expnt = 0 THEN
RETURN (make_listed_product_space([]));
ELSE
RETURN (make_uniform_product_space(uspc.base,expnt));
END_IF;
ELSE
factors := spc\listed_product_space.factors;
IF idx <= SIZEOF (factors) THEN REMOVE (factors, idx); END_IF;
IF prefix > 0 THEN
INSERT (factors, vdomn, 0);
IF prefix > 1 THEN INSERT (factors, vdomn, 0); END_IF;
END_IF;
RETURN (make_listed_product_space(factors));
END_IF;
END_FUNCTION; -- process_product_space
-- Resume body of derive_definite_integral_domain function
LOCAL
idomn : tuple_space := igrl.integrand.domain;
types : SET OF STRING := TYPEOF (idomn);
idx : INTEGER := igrl.variable_of_integration;
tupled : BOOLEAN := bool(((space_dimension(idomn) = 1) AND
((schema_prefix + 'TUPLE_SPACE') IN types)));
prefix : INTEGER := 0;
espc : extended_tuple_space;
vdomn : maths_space;
END_LOCAL;
IF tupled THEN
idomn := factor1(idomn);
types := TYPEOF (idomn);
END_IF;
IF igrl.lower_limit_neg_infinity THEN prefix := prefix + 1; END_IF;
IF igrl.upper_limit_pos_infinity THEN prefix := prefix + 1; END_IF;
vdomn := factor_space(idomn,idx);
IF (schema_prefix + 'EXTENDED_TUPLE_SPACE') IN types THEN
espc := idomn;
idomn := make_extended_tuple_space(process_product_space(espc.base,idx,
prefix,vdomn),espc.extender);
ELSE
idomn := process_product_space(idomn,idx,prefix,vdomn);
END_IF;
IF tupled THEN RETURN (one_tuples_of(idomn));
ELSE RETURN (idomn); END_IF;
END_FUNCTION; -- derive_definite_integral_domain
Referenced By
Defintion derive_definite_integral_domain is references by the following definitions:
[Top Level Definitions] [Exit]Generated by STEP Tools® EXPRESS to HTML Converter
2012-03-27T17:13:59-04:00