<< Reshape SYMSCI Toolbox Sub >>

SYMSCI Toolbox >> SYMSCI Toolbox > Set

Set

set of symbolic scalars

Calling Sequence

S: Set()
S: Set( A )

Arguments

A

set of symbolic scalars

S

set of symbolic scalars

Description

Set()

Returns an empty set.

Set( A )

Returns a set, which is a copy the set A.

The elements of symbolic sets are symbolic scalars.

Other symbolic object types (scalar, vector, or matrix) are created using Sym(..), Vec(..), or Mat(..).

Examples

// create an empty symbolic set
A = %(Set())

// create a symbol
x = %(Sym("x"))

// add some elements to set a
A: int32(5)
A: 1.23
A: "y"
A: x+x

// create a copy of set a
B = %(Set(A))

// add more elements to b
B: "sin(x)"
B: "cos(y)"

// how many elements are in b
elems(B)

// clean-up
free(A); free(x); free(B);
clear A x B;

See Also

Authors

Bibliography

SymEngine: C++ library for fast symbolic manipulation.


Report an issue
<< Reshape SYMSCI Toolbox Sub >>