Difference between revisions of "Domain Access Functions"

(Created page with '''new to Analytica 4.3'' Once a domain is specified, domain access functions make it possible for your Analytica expressions to extract information about the domain for a va…')
 
Line 1: Line 1:
''new to [[Analytica 4.3]]''
+
 
 +
__TOC__
  
 
Once a domain is specified, domain access functions make it possible for your Analytica expressions to extract information about the domain for a variable.
 
Once a domain is specified, domain access functions make it possible for your Analytica expressions to extract information about the domain for a variable.
Line 5: Line 6:
 
In complex domain specifications, the domain information may vary along an index (an array-valued domain), in which case the return values from these functions could be array-valued.
 
In complex domain specifications, the domain information may vary along an index (an array-valued domain), in which case the return values from these functions could be array-valued.
  
= DomainType(X) =
+
== DomainType(X) ==
  
 
Returns the type of domain for variable «X» as one of the following:
 
Returns the type of domain for variable «X» as one of the following:
Line 15: Line 16:
 
* "GroupedInteger"
 
* "GroupedInteger"
  
= DomainLowerBound(X) =
+
== DomainLowerBound(X) ==
  
For a [[Continuous]] or [[Integer]] domain types, returns the lower bound (smallest possible value), or -INF when unbounded from below.   
+
For a [[Continuous]] or [[Integer]] domain types, returns the lower bound (smallest possible value), or -[[INF]] when unbounded from below.   
 
For a [[Boolean]] domain, returns 0.
 
For a [[Boolean]] domain, returns 0.
 
For a [[GroupedInteger]] domain returns 1.
 
For a [[GroupedInteger]] domain returns 1.
For other domain types, returns [[«null»]].
+
For other domain types, returns [[Null]].
  
= DomainUpperBound(X) =
+
== DomainUpperBound(X) ==
  
For a [[Continuous]] or [[Integer]] domain types, returns the lower bound (smallest possible value), or INF when unbounded from below.   
+
For a [[Continuous]] or [[Integer]] domain types, returns the lower bound (smallest possible value), or [[INF]] when unbounded from below.   
 
For a [[Boolean]] domain, returns 1.
 
For a [[Boolean]] domain, returns 1.
For other domain types, returns [[«null»]].
+
For other domain types, returns [[Null]].
  
= DomainIntegerGroup(X) =
+
== DomainIntegerGroup(X) ==
  
For a [[GroupedInteger]] domain, returns the textual name of the group.  For an unnamed group, returns an empty (zero-length) text string, "".  For any other domain type, returns [[«null»]].
+
For a [[GroupedInteger]] domain, returns the textual name of the group.  For an unnamed group, returns an empty (zero-length) text string, "".  For any other domain type, returns [[Null]].
  
= DomainAllowed(X) =
+
== DomainAllowed(X) ==
  
 
For a [[Discrete]] domain with explicit values, including a ''Copy from index'' domain, returns a [[reference]] to the list of possible values.  When the set of possible values varies along one or more indexes, the result will be an array of [[reference]]s.   
 
For a [[Discrete]] domain with explicit values, including a ''Copy from index'' domain, returns a [[reference]] to the list of possible values.  When the set of possible values varies along one or more indexes, the result will be an array of [[reference]]s.   
  
= DomainNullOk(X) =
+
== DomainNullOk(X) ==
  
 
Returns 1 (true) when a [[Null]] value is considered acceptable, i.e., not flagged as out-of-range.  [[Null]] is often used to indicate missing data.  Returns 0 when a [[Null]] value is considered out-of-range.
 
Returns 1 (true) when a [[Null]] value is considered acceptable, i.e., not flagged as out-of-range.  [[Null]] is often used to indicate missing data.  Returns 0 when a [[Null]] value is considered out-of-range.
 +
 +
==History==
 +
Introduced in [[Analytica 4.3]].
 +
 +
==See Also==
 +
* [[Data Type Functions]]

Revision as of 04:22, 22 January 2016

Once a domain is specified, domain access functions make it possible for your Analytica expressions to extract information about the domain for a variable.

In complex domain specifications, the domain information may vary along an index (an array-valued domain), in which case the return values from these functions could be array-valued.

DomainType(X)

Returns the type of domain for variable «X» as one of the following:

  • "Automatic"
  • "Continuous"
  • "Integer"
  • "Boolean"
  • "Discrete"
  • "GroupedInteger"

DomainLowerBound(X)

For a Continuous or Integer domain types, returns the lower bound (smallest possible value), or -INF when unbounded from below. For a Boolean domain, returns 0. For a GroupedInteger domain returns 1. For other domain types, returns Null.

DomainUpperBound(X)

For a Continuous or Integer domain types, returns the lower bound (smallest possible value), or INF when unbounded from below. For a Boolean domain, returns 1. For other domain types, returns Null.

DomainIntegerGroup(X)

For a GroupedInteger domain, returns the textual name of the group. For an unnamed group, returns an empty (zero-length) text string, "". For any other domain type, returns Null.

DomainAllowed(X)

For a Discrete domain with explicit values, including a Copy from index domain, returns a reference to the list of possible values. When the set of possible values varies along one or more indexes, the result will be an array of references.

DomainNullOk(X)

Returns 1 (true) when a Null value is considered acceptable, i.e., not flagged as out-of-range. Null is often used to indicate missing data. Returns 0 when a Null value is considered out-of-range.

History

Introduced in Analytica 4.3.

See Also

Comments


You are not allowed to post comments.