Crate iterative_methods[−][src]
Expand description
iterative-methods
A demonstration of the use of StreamingIterators and their adapters to implement iterative algorithms.
Modules
algorithms | |
conjugate_gradient | |
utils |
Structs
AnnotatedIterable | An adaptor that annotates every underlying item |
AnnotatedResult | Store a generic annotation next to the state. |
Enumerate | An adaptor that enumerates items. |
ExtractValue | An adaptor that converts items from |
Numbered | A struct that wraps an |
ReservoirSample | An optimal reservoir sampling algorithm is implemented.
|
StepBy | An iterator for stepping iterators by a custom amount. |
TakeUntil | An adaptor that returns initial elements until and including the first satisfying a predicate. |
TimedIterable | Times every call to |
TimedResult | TimedResult decorates with two duration fields: start_time is relative to the creation of the process generating results, and duration is relative to the start of the creation of the current result. |
ToFileIterable | Write items of StreamingIterator to a file. |
ToYamlIterable | Write items of StreamingIterator to a Yaml file. |
WdIterable | WdIterable provides an easy conversion of any iterable to one whose items are WeightedDatum. WdIterable holds an iterator and a function. The function is defined by the user to extract weights from the iterable and package the old items and extracted weights into items as WeightedDatum |
WeightedDatum | Weighted Sampling The WeightedDatum struct wraps the values of a data set to include a weight for each datum. Currently, the main motivation for this is to use it for Weighted Reservoir Sampling (WRS). |
WeightedReservoirSample | The weighted reservoir sampling algorithm of M. T. Chao is implemented.
|
Enums
UntilState |
Traits
YamlDataType | Define a trait object for converting to YAML objects. |
Functions
assess | Annotate every underlying item with its score, as defined by |
enumerate | A constructor for Enumerate. |
extract_value | The constructor for ExtractValue. Apply it to a StreamingIterator with
|
inspect | Apply |
item_to_file | An adaptor that writes each item to a new line of a file. |
last | Get the item before the first None, assuming any exist. |
new_datum | Constructor for WeightedDatum. |
reservoir_sample | An adaptor for which the items are random samples of the underlying iterator up to the item processed. The constructor for ReservoirSample. |
step_by | Creates an iterator starting at the same point, but stepping by the given amount at each iteration. |
take_until | Creates an iterator which returns initial elements until and including the first satisfying a predicate. |
time | Wrap each value of a streaming iterator with the durations: |
wd_iterable | Annotates items of an iterable with a weight using a function |
weighted_reservoir_sample | Create a random sample of the underlying weighted stream. |
write_yaml_documents | Adaptor that writes each item to a YAML document. |
write_yaml_object | Function used by ToYamlIterable to specify how to write each item to file. |