SCL.AggregationDataTypes.SET Class Reference

Public Member Functions

def add (self, value)
 
def bound_1 (self)
 
def bound_2 (self)
 
def get_hibound (self)
 
def get_hiindex (self)
 
def get_lobound (self)
 
def get_loindex (self)
 
def get_size (self)
 
def get_value_unique (self)
 
- Public Member Functions inherited from SCL.BaseType.Type
def get_scope (self)
 
def get_type (self)
 

Detailed Description

EXPRESS definition:
==================
A set data type has as its domain unordered collections of like elements. The set data type is
a specialization of the bag data type. The optional lower and upper bounds, which are integer-
valued expressions, define the minimum and maximum number of elements that can be held in
the collection defined by a set data type. The collection defined by set data type shall not
contain two or more elements which are instance equal.
Syntax:
285 set_type = SET [ bound_spec ] OF base_type .
176 bound_spec = '[' bound_1 ':' bound_2 ']' .
174 bound_1 = numeric_expression .
175 bound_2 = numeric_expression .
171 base_type = aggregation_types | simple_types | named_types .
Rules and restrictions:
a) The bound_1 expression shall evaluate to an integer value greater than or equal to
zero. It gives the lower bound, which is the minimum number of elements that can be in a
set value of this data type. bound_1 shall not produce the indeterminate (?) value.
b) The bound_2 expression shall evaluate to an integer value greater than or equal to
bound_1, or an indeterminate (?) value. It gives the upper bound, which is the maximum
number of elements that can be in a set value of this data type.
If this value is indeterminate (?) the number of elements in a set value of this data type is
not be bounded from above.
c) If the bound_spec is omitted, the limits are [0:?].
d) Each element in an occurrence of a set data type shall be different from (i.e., not
instance equal to) every other element in the same set value.
EXAMPLE 30 { This example defines an attribute as a set of points (a named data type assumed
to have been declared elsewhere).
a_set_of_points : SET OF point;
The attribute named a_set_of_points can contain zero or more points. Each point instance (in
the set value) is required to be different from every other point in the set.
If the value is required to have no more than 15 points, the specification can provide an upper bound,
as in:
a_set_of_points : SET [0:15] OF point;
The value of the attribute named a_set_of_points now may contain no more than 15 points.

Python definition:
==================
The difference with the BAG class is that the base container for SET is a set object.

Member Function Documentation

◆ add()

def SCL.AggregationDataTypes.SET.add (   self,
  value 
)
Adds a value to the bag

References SCL.AggregationDataTypes.ARRAY._bound_1, SCL.AggregationDataTypes.LIST._bound_1, SCL.AggregationDataTypes.BAG._bound_1, SCL.AggregationDataTypes.SET._bound_1, SCL.AggregationDataTypes.ARRAY._bound_2, SCL.AggregationDataTypes.LIST._bound_2, SCL.AggregationDataTypes.BAG._bound_2, SCL.AggregationDataTypes.SET._bound_2, SCL.AggregationDataTypes.ARRAY._container, SCL.AggregationDataTypes.LIST._container, SCL.AggregationDataTypes.BAG._container, SCL.AggregationDataTypes.SET._container, SCL.AggregationDataTypes.LIST._unbounded, SCL.AggregationDataTypes.BAG._unbounded, SCL.AggregationDataTypes.SET._unbounded, SCL.AggregationDataTypes.SET.add(), and SCL.BaseType.Type.get_type().

Referenced by SCL.AggregationDataTypes.SET.add().

◆ bound_1()

def SCL.AggregationDataTypes.SET.bound_1 (   self)

References SCL.AggregationDataTypes.ARRAY._bound_1, SCL.AggregationDataTypes.LIST._bound_1, SCL.AggregationDataTypes.BAG._bound_1, and SCL.AggregationDataTypes.SET._bound_1.

◆ bound_2()

def SCL.AggregationDataTypes.SET.bound_2 (   self)

References SCL.AggregationDataTypes.ARRAY._bound_2, SCL.AggregationDataTypes.LIST._bound_2, SCL.AggregationDataTypes.BAG._bound_2, and SCL.AggregationDataTypes.SET._bound_2.

◆ get_hibound()

def SCL.AggregationDataTypes.SET.get_hibound (   self)

References SCL.AggregationDataTypes.ARRAY._bound_2, SCL.AggregationDataTypes.LIST._bound_2, SCL.AggregationDataTypes.BAG._bound_2, and SCL.AggregationDataTypes.SET._bound_2.

◆ get_hiindex()

def SCL.AggregationDataTypes.SET.get_hiindex (   self)
 When V is a bag, list or set, the returned value is the actual number of elements in
the aggregate value.

References SCL.AggregationDataTypes.ARRAY._container, SCL.AggregationDataTypes.LIST._container, SCL.AggregationDataTypes.BAG._container, and SCL.AggregationDataTypes.SET._container.

◆ get_lobound()

def SCL.AggregationDataTypes.SET.get_lobound (   self)

References SCL.AggregationDataTypes.ARRAY._bound_1, SCL.AggregationDataTypes.LIST._bound_1, SCL.AggregationDataTypes.BAG._bound_1, and SCL.AggregationDataTypes.SET._bound_1.

◆ get_loindex()

def SCL.AggregationDataTypes.SET.get_loindex (   self)

◆ get_size()

def SCL.AggregationDataTypes.SET.get_size (   self)
 When V is a bag, list or set, the returned value is the actual number of elements in
the aggregate value.

References SCL.AggregationDataTypes.ARRAY._container, SCL.AggregationDataTypes.LIST._container, SCL.AggregationDataTypes.BAG._container, and SCL.AggregationDataTypes.SET._container.

Referenced by SCL.AggregationDataTypes.ARRAY.get_value_unique(), SCL.AggregationDataTypes.LIST.get_value_unique(), and SCL.AggregationDataTypes.BAG.get_value_unique().

◆ get_value_unique()

def SCL.AggregationDataTypes.SET.get_value_unique (   self)
 Return True if all items are different in the container, UNKNOWN if some items are
indeterminate, or False otherwise

References SCL.AggregationDataTypes.ARRAY._container, SCL.AggregationDataTypes.LIST._container, SCL.AggregationDataTypes.BAG._container, and SCL.AggregationDataTypes.SET._container.


The documentation for this class was generated from the following file: