Overview Schemas Index

MATHEMATICAL_FUNCTIONS_SCHEMA (jsdai.SMathematical_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

public class FFactor_space
          public static Value run(SdaiContext _context, Value tspace, Value idx)