Created by Davide Carpi in the scope of SMath project. Published by Davide Carpi.
This is Open Source project. Sources shared under MIT Licence and available in public SVN repository.

Features of Set Operations

Version 0.4.8992.40087

Functions

Additional components that add new mathematical functions to the SMath Studio program, necessary for solving problems from various fields.

  1. set_Cardinality("matrix")
    Returns the number of unique elements in "matrix".
  2. set_CartesianProduct(...)
    Cartesian product of "1:set", "2:set", ..., "n:set".
  3. set_Choose("matrix")
    Returns all combinations of the elements contained in the set "matrix". Duplicate elements are taken into account.
  4. set_Choose("1:matrix", "2:number")
    Returns all combinations of size "2:number" of the elements contained in the set "1:matrix". Duplicate elements are taken into account.
  5. set_Complement("matrix")
    Returns the set of elements in "set_Universe" not in "matrix".
  6. set_Contains("1:matrix", "2:variable")
    Returns 1 if "1:matrix" contains "2:variable", 0 otherwise.
  7. set_Difference(...)
    Returns a set of elements that are in "1:set" but not in "2:set", ...,"n:set".
  8. set_DoesNotContain("1:matrix", "2:variable")
    Returns 1 if "1:matrix" does not contain "2:variable", 0 otherwise.
  9. set_DoesNotExist("1:matrix", "2:function")
    Non existential quantifier. Returns 1 if for all elements of "1:matrix" the predicate "2:function" is always false, 0 otherwise.
  10. set_ElementOf("1:variable", "2:matrix")
    Returns 1 if "1:variable" is an element of "2:matrix", 0 otherwise.
  11. set_Exists("1:matrix", "2:function")
    Existential quantifier. Returns 1 if for at least one element of "1:matrix" the predicate "2:function" is true, 0 otherwise.
  12. set_Exists1("1:matrix", "2:function")
    Unique existential quantifier. Returns 1 if for one and only one element of "1:matrix" the predicate "2:function" is true, 0 otherwise.
  13. set_ForAll("1:matrix", "2:function")
    Universal quantifier. Returns 1 if for all elements of "1:matrix" the predicate "2:function" is always true, 0 otherwise.
  14. set_Intersection(...)
    Returns a set of elements that are in all sets "1:set", "2:set", ..., "n:set".
  15. set_NotElementOf("1:variable", "2:matrix")
    Returns 1 if "1:variable" is an element of "2:matrix", 0 otherwise.
  16. set_NotSubset("1:matrix", "2:matrix")
    Returns 1 if "1:matrix" is not a subset of "2:matrix", 0 otherwise.
  17. set_NotSuperset("1:matrix", "2:matrix")
    Returns 1 if "1:matrix" is not a superset of "2:matrix", 0 otherwise.
  18. set_Permute("matrix")
    Returns all permutations from the elements contained in the set "matrix". Duplicate elements are taken into account.
  19. set_Permute("1:matrix", "2:number")
    Returns all permutations from the elements contained in the set "1:matrix" taken "2:number" at a time. Duplicate elements are taken into account.
  20. set_PowerSet("matrix")
    Returns the set of all subsets of "matrix".
  21. set_ProperSubset("1:matrix", "2:matrix")
    Returns 1 if "1:matrix" is a proper subset of "2:matrix", 0 otherwise.
  22. set_ProperSuperset("1:matrix", "2:matrix")
    Returns 1 if "1:matrix" is a proper superset of "2:matrix", 0 otherwise.
  23. set_SetBuilder(...)
    Definition of a set by predicate.
  24. set_Shuffle("matrix")
    Shuffle the elements of a set "matrix". Duplicate elements are kept.
  25. set_Shuffle("1:matrix", "2:number")
    Shuffle the elements of a set "1:matrix" using a seed "2:number". Duplicate elements are kept.
  26. set_Sort("matrix")
    Sort elements of a set "matrix" in natural order. Duplicate elements are kept.
  27. set_Subset("1:matrix", "2:matrix")
    Returns 1 if "1:matrix" is a subset of "2:matrix", 0 otherwise.
  28. set_Superset("1:matrix", "2:matrix")
    Returns 1 if "1:matrix" is a superset of "2:matrix", 0 otherwise.
  29. set_SymmetricDifference(...)
    Returns a set of elements that belongs to any one of "1:set", "2:set", ...,"n:set", but are not present in multiple sets.
  30. set_Union(...)
    Returns a set of elements that are in "1:set" or "2:set" ... or "n:set" sets.
  31. set_Unique("matrix")
    Remove duplicate elements from a set "matrix"; output elements are sorted in natural order.