[Home] Module Microsoft.FSharp.MLLib.Set


Immutable sets implemented via binary trees

Types

TypeDescription
type Component

Deprecated: This name is deprecated. Use CSetOps instead

Note: an abbreviation for CSetOps<'a>
type CSet Sets with a user-defined comparison function.
type CSetOps A collection of operations for creating and using sets based on a particular comparison function.
type giterator
type Set Immutable sets, where comparison is the structural comparison function These sets can be used with elements of any type, but you should check that structural hashing and equality on the element type are correct for your type. Efficiency: Structural comparison is relatively efficient but is not a suitable choice in all circumstances, e.g. it may not compare efficiently on non-reference types and deeply-structured types.
type t For use when not opening the Set module, e.g. Set.t Note: an abbreviation for Set<'a>
type UserSet

Deprecated: This name is deprecated. Use CSet instead

Note: an abbreviation for 'a CSet

Values

ValueDescription
val add : 'a -> Set<'a> -> Set<'a>
Return a new set with an element added to the set. No exception is raised if the set already contains the given element.
val cardinal : Set<'a> -> int
Return the number of elements in the set. Same as "size"
val choose : Set<'a> -> 'a
Choose an arbitrary element from a set
val compare : Set<'a> -> Set<'a> -> int
Compare two sets. Places sets into a total order.
val diff : Set<'a> -> Set<'a> -> Set<'a>
Return a new set with the elements of the second set removed from the first.
val elements : Set<'a> -> 'a list
The elements of the set as a list.
val empty : Set<'a>
The empty set.
val equal : Set<'a> -> Set<'a> -> bool
Test if two sets are equal
val exists : ('a -> bool) -> Set<'a> -> bool
Test if any element of the collection satisfies the given predicate. If the elements are "i0...iN" then computes "p i0 or ... or p iN".
val filter : ('a -> bool) -> Set<'a> -> Set<'a>
Return a new collection containing only the elements of the collection for which the given predicate returns "true"
val fold : ('a -> 'b -> 'b) -> Set<'a> -> 'b -> 'b
Apply the given accumulating function to all the elements of the set
val for_all : ('a -> bool) -> Set<'a> -> bool
Test if all elements of the collection satisfy the given predicate. If the elements are "i0...iN" and "j0...jN" then computes "p i0 && ... && p iN".
val get_IEnumerator : Set<'a> -> IEnumerator<'a>
Return an enumerator for performing imperative enumerations over the given collection.
val inter : Set<'a> -> Set<'a> -> Set<'a>
Compute the intersection of the two sets.
val is_empty : Set<'a> -> bool
Return "true" if the set is empty
val iter : ('a -> unit) -> Set<'a> -> unit
Apply the given function to each element of the set, in order according to the comparison function
val Make : ('a -> 'a -> int) -> CSetOps<'a>
A functor to build a collection of operations for creating and using sets based on the given comparison function Specifies a new kind of CSet. This returns a record that contains the functions you use to create and manipulate sets of this kind. (The returned value is a lot like an ML module, except it is a record in the core language.)
val max_elt : Set<'a> -> 'a
Returns the highest element in the set according to the ordering being used for the set
val mem : 'a -> Set<'a> -> bool
Evaluates to "true" if the given element is in the given set
val min_elt : Set<'a> -> 'a
Returns the lowest element in the set according to the ordering being used for the set
val of_array : 'a array -> Set<'a>
Build a set that contains the same elements as the given array
val of_ICollection : #ICollection<'a> -> Set<'a>
Build a new collection from any type that supports the .NET ICollection interface Unspecified behaviour if the underlying collection is mutated.
val of_IEnumerable : #IEnumerable<'a> -> Set<'a>
Build a new collection from the given enumerable object
val of_list : 'a list -> Set<'a>
Build a set that contains the same elements as the given list
val of_stream : 'a stream -> Set<'a>
Build a set that contains the same elements as the given stream. The stream must be finite.
val partition : ('a -> bool) -> Set<'a> -> Set<'a> * Set<'a>
Split the set into two sets containing the elements for which the given predicate returns true and false respectively
val remove : 'a -> Set<'a> -> Set<'a>
Return a new set with the given element removed. No exception is raised in the set doesn't contain the given element.
val singleton : 'a -> Set<'a>
The set containing the given one element.
val size : Set<'a> -> int
Return the number of elements in the set
val subset : Set<'a> -> Set<'a> -> bool
Evaluates to "true" if all elements of the first set are in the second
val to_array : Set<'a> -> 'a array
Build an array that contains the elements of the set in order
val to_ICollection : Set<'a> -> ICollection<'a>
Return a view of the collection as a .NET collection. Results in a ReadOnly collection
val to_IEnumerable : Set<'a> -> IEnumerable<'a>
Return a view of the collection as an enumerable object
val to_list : Set<'a> -> 'a list
Build a list that contains the elements of the set in order
val to_stream : Set<'a> -> 'a stream
Build a stream that contains the elements of the set in order
val union : Set<'a> -> Set<'a> -> Set<'a>
Compute the union of the two sets.

See Also

Microsoft.FSharp.MLLib


Documentation for assembly mllib, version 1.1.10.1, generated using F# version 1.1.10.1