Operators and Functions - Statistics (old)
The Statistics II module, released May 1998, replaces the Statistics module. The Statistics II module uses the same operators and functions as all other Vulcan modules (Appendix D). The "old" Statistics module however, uses different operators and functions which are listed in the current appendix. The "old" Statistics module will be removed in the near future together with its associated appendix.
The "old" Statistics module allows you to specify one or more conditions which are used to restrict block model or mapfile data on which you want to work.
- Format
- Operators
- Multiple Conditions
- Complex Conditions
Format
Conditions are entered in the format:
<variable><operator><value>
where
<variable>
=
the name of the block model variable (upper or lower case) or the number of a mapfile variable. Mapfile variables must be preceded by a $ (dollar sign);
<operator>
=
a symbol or textual operator (see below);
<value>
=
a numeric or alphanumeric value.
Note Alphanumeric values must be in quotes. For example, "ABC1".
Operators
The following is a list of allowable operators. Textual operators can be entered in either upper or lower case.
|
Symbol |
Textual |
Description |
|
== |
eq |
equals |
|
!= |
ne |
not equal |
|
> |
gt |
greater than |
|
< |
lt |
less than |
|
>= |
ge |
greater than or equal to |
|
<= |
le |
less than or equal to |
Examples
For a block model with the variable AU, the condition
AU >= 0.15
will select the blocks where the gold value is greater than or equal to 0.15.
For a block model with the variable CLASS, the condition
CLASS = "OXIDE"
will select the blocks where the class variable is equal to OXIDE.
For a mapfile that will be read in the order XYZ12 used in Geology/Compositing - Display (and in the pre 3.3 Statistics module), the condition
$1 eq 99
will select points from the mapfile where the first variable ($1) is equal to 99.
Multiple Conditions
If there is more than one field available for the entry of conditions, each condition can be entered in a separate field. If there is only one field available, conditions can be combined to form one condition. This is done through the following operators:
|
Symbol |
Textual |
Description |
|
&& |
and |
logical and |
|
|| |
or |
logical or |
|
! |
not |
logical not |
Whether you enter separate conditions or combine conditions, the values extracted must meet each of the conditions.
Examples
Using the block model on the previous page, the condition
AU >= 0.15 and AU <= 0.10
will select all gold values greater than or equal to 0.15 and all values less than or equal to 0.10 (for example values between 0.11 and 0.14 inclusive will be ignored).
For a mapfile read in the order XYZ12, the condition
$1 gt 5 and $1 lt 10
will select all points where the first variable is between 5 and 10 (not inclusive).
Complex Conditions
Complex conditions have the format:
<sub-expression><operator><value>
where
<sub-expression>
is an arithmetic sub expression made up of variables, values and arithmetic operators from the following list.
|
Operator |
Description |
|
( |
open parenthesis |
|
) |
close parenthesis |
|
* |
multiplication |
|
/ |
division |
|
+ |
addition |
|
- |
subtraction |
|
& |
bitwise and |
|
| |
bitwise or |
The above operators are shown in decreasing order of precedence, parenthesis may be used to change the order.
Examples
A valid arithmetic sub expression for a block model containing the variable sio2 would be
(sio2 / 16).
This could then be used in a condition as follows: sio2 / 16) <= 0.1.
This will only select blocks where the sio2 value is less than or equal to 1.6.
