Struct rgsl::types::multiset::MultiSet [] [src]

pub struct MultiSet { /* fields omitted */ }

Methods

impl MultiSet
[src]

This function allocates memory for a new multiset with parameters n, k. The multiset is not initialized and its elements are undefined. Use the function gsl_multiset_calloc if you want to create a multiset which is initialized to the lexicographically first multiset element. A null pointer is returned if insufficient memory is available to create the multiset.

This function allocates memory for a new multiset with parameters n, k and initializes it to the lexicographically first multiset element. A null pointer is returned if insufficient memory is available to create the multiset.

This function initializes the multiset c to the lexicographically first multiset element, i.e. 0 repeated k times.

This function initializes the multiset c to the lexicographically last multiset element, i.e. n-1 repeated k times.

This function copies the elements of the multiset self into the multiset dest. The two multisets must have the same size.

This function returns the value of the i-th element of the multiset c. If i lies outside the allowed range of 0 to k-1 then the error handler is invoked and 0 is returned.

This function returns the range (n) of the multiset self.

This function returns the number of elements (k) in the multiset self.

This function returns a pointer to the array of elements in the multiset self.

This function checks that the multiset self is valid. The k elements should lie in the range 0 to n-1, with each value occurring in nondecreasing order.

This function advances the multiset self to the next multiset element in lexicographic order and returns ::Value::Success. If no further multisets elements are available it returns enums::value::Failure and leaves self unmodified. Starting with the first multiset and repeatedly applying this function will iterate through all possible multisets of a given order.

This function steps backwards from the multiset self to the previous multiset element in lexicographic order, returning ::Value::Success. If no previous multiset is available it returns enums::value::Failure and leaves self unmodified.

Trait Implementations

impl Drop for MultiSet
[src]

A method called when the value goes out of scope. Read more