var searchIndex = {}; searchIndex["itertools"] = {"doc":"Itertools — extra iterator adaptors, functions and macros.","items":[[3,"Interleave","itertools","An iterator adaptor that alternates elements from two iterators until both\nrun out.",null,null],[3,"Product","","An iterator adaptor that iterates over the cartesian product of\nthe element sets of two iterators **I** and **J**.",null,null],[3,"PutBack","","An iterator adaptor that allows putting back a single\nitem to the front of the iterator.",null,null],[3,"FnMap","","A clonable iterator adaptor to map elementwise\nfrom one iterator to another, using a function pointer.",null,null],[3,"Dedup","","An iterator adaptor that removes duplicates from sections of consecutive\nidentical elements. If the iterator is sorted, all elements will be\nunique.",null,null],[3,"Batching","","A “meta iterator adaptor”. Its closure recives a reference to the iterator\nand may pick off as many elements as it likes, to produce the next iterator element.",null,null],[3,"GroupBy","","An iterator adaptor that groups iterator elements. Consecutive elements\nthat map to the same key (“runs”), are returned as the iterator elements.",null,null],[3,"Step","","An iterator adaptor that steps a number elements in the base iterator\nfor each iteration.",null,null],[3,"Merge","","An iterator adaptor that merges the two base iterators in ascending order.\nIf both base iterators are sorted (ascending), the result is sorted.",null,null],[3,"MultiPeek","","An iterator adaptor that allows the user to peek at multiple *.next()*\nvalues without advancing itself.",null,null],[3,"Intersperse","","An iterator adaptor to insert a particular value\nbetween each element of the adapted iterator.",null,null],[3,"ISlice","","An iterator adaptor that yields a subset (a slice) of the base iterator.",null,null],[3,"RepeatN","","An iterator that repeats an element exactly *n* times.",null,null],[3,"RcIter","","A wrapper for **Rc\\<RefCell\\<I\\>\\>**, that implements the **Iterator** trait.",null,null],[12,"rciter","","The boxed iterator.",0,null],[3,"Stride","","An iterator similar to the slice iterator, but with a certain number of steps\n(the stride) skipped per iteration.",null,null],[3,"StrideMut","","The mutable equivalent of Stride.",null,null],[3,"Tee","","One half of an iterator pair where both return the same elements.",null,null],[3,"Times","","A simple iterator to repeat a given number of times",null,null],[3,"Linspace","","An iterator of a sequence of evenly spaced floats.",null,null],[3,"ZipLongest","","An iterator which iterates two other iterators simultaneously",null,null],[3,"Zip","","An iterator that generalizes *.zip()* and allows running multiple iterators in lockstep.",null,null],[4,"EitherOrBoth","","A value yielded by `ZipLongest`.\nContains one or two values,\ndepending on which of the input iterators are exhausted.",null,null],[13,"Both","","Neither input iterator is exhausted yet, yielding two values.",1,null],[13,"Left","","The parameter iterator of `.zip_longest()` is exhausted,\nonly yielding a value from the `self` iterator.",1,null],[13,"Right","","The `self` iterator of `.zip_longest()` is exhausted,\nonly yielding a value from the parameter iterator.",1,null],[5,"times","","Return an iterator with `n` elements, for simple repetition\na particular number of times. The iterator yields a counter.",null,{"inputs":[{"name":"usize"}],"output":{"name":"times"}}],[5,"linspace","","Return an iterator with `n` elements, where the first\nelement is `a` and the last element is `b`.",null,{"inputs":[{"name":"f"},{"name":"f"},{"name":"usize"}],"output":{"name":"linspace"}}],[5,"equal","","Return **true** if both iterators produce equal sequences\n(elements pairwise equal and sequences of the same length),\n**false** otherwise.",null,{"inputs":[{"name":"i"},{"name":"j"}],"output":{"name":"bool"}}],[11,"clone","","",2,null],[11,"new","","Creat a new **Interleave** iterator.",2,{"inputs":[{"name":"i"},{"name":"j"}],"output":{"name":"interleave"}}],[11,"next","","",2,null],[11,"new","","Create a new **FnMap**.",3,null],[11,"next","","",3,null],[11,"size_hint","","",3,null],[11,"next_back","","",3,null],[11,"clone","","",3,null],[11,"clone","","",4,null],[11,"new","","Iterator element type is `A`",4,{"inputs":[{"name":"i"}],"output":{"name":"self"}}],[11,"put_back","","Put back a single value to the front of the iterator.",4,null],[11,"next","","",4,null],[11,"size_hint","","",4,null],[11,"clone","","",5,null],[11,"new","","Create a new cartesian product iterator",5,{"inputs":[{"name":"i"},{"name":"j"}],"output":{"name":"self"}}],[11,"next","","",5,null],[11,"size_hint","","",5,null],[11,"clone","","",6,null],[11,"new","","Create a new Dedup Iterator.",6,{"inputs":[{"name":"i"}],"output":{"name":"dedup"}}],[11,"next","","",6,null],[11,"size_hint","","",6,null],[11,"clone","","",7,null],[11,"new","","Create a new Batching iterator.",7,{"inputs":[{"name":"i"},{"name":"f"}],"output":{"name":"batching"}}],[11,"next","","",7,null],[11,"size_hint","","",7,null],[11,"clone","","",8,null],[11,"new","","Create a new **GroupBy** iterator.",8,{"inputs":[{"name":"i"},{"name":"f"}],"output":{"name":"self"}}],[11,"next","","",8,null],[11,"size_hint","","",8,null],[11,"clone","","",9,null],[11,"new","","Create a **Step** iterator.",9,{"inputs":[{"name":"i"},{"name":"usize"}],"output":{"name":"self"}}],[11,"next","","",9,null],[11,"size_hint","","",9,null],[11,"new","","Create a **Merge** iterator.",10,{"inputs":[{"name":"i"},{"name":"j"},{"name":"f"}],"output":{"name":"self"}}],[11,"clone","","",10,null],[11,"next","","",10,null],[11,"size_hint","","",10,null],[11,"clone","","",11,null],[11,"new","","Create a **MultiPeek** iterator.",11,{"inputs":[{"name":"i"}],"output":{"name":"multipeek"}}],[11,"peek","","Works exactly like *.next()* with the only difference that it doesn't\nadvance itself. *.peek()* can be called multiple times, to peek\nfurther ahead.",11,null],[11,"next","","",11,null],[11,"size_hint","","",11,null],[11,"clone","","",12,null],[11,"new","","Create a new Intersperse iterator",12,{"inputs":[{"name":"i"},{"name":"item"}],"output":{"name":"self"}}],[11,"next","","",12,null],[11,"size_hint","","",12,null],[11,"clone","","",13,null],[11,"new","","Create a new **ISlice**.",13,{"inputs":[{"name":"i"},{"name":"r"}],"output":{"name":"self"}}],[11,"next","","",13,null],[11,"size_hint","","",13,null],[11,"next","","",14,null],[11,"size_hint","","",14,null],[0,"misc","","A module of helper traits and iterators that are not intended to be used\ndirectly.",null,null],[3,"FlatTuples","itertools::misc","A helper iterator that maps an iterator of tuples like\n`((A, B), C)` to an iterator of `(A, B, C)`.",null,null],[8,"IntoIteratorTuple","","Apply **IntoIterator** on each element of a tuple.",null,null],[16,"Output","","Tuple of values that implement **Iterator**.",15,null],[10,"into_iterator_tuple","","Return a tuple of iterators.",15,null],[8,"AppendTuple","","A helper trait for (x, y, z) ++ w => (x, y, z, w),\nused for implementing `iproduct!`.",null,null],[16,"Result","","Resulting tuple type",16,null],[10,"append","","“Append” value **x** to a tuple.",16,null],[8,"GenericRange","","**GenericRange** is implemented by Rust's built-in range types, produced\nby range syntax like `a..`, `..b` or `c..d`.",null,null],[11,"start","","Start index (inclusive)",17,null],[11,"end","","End index (exclusive)",17,null],[8,"ToFloat","","Helper trait to convert usize to floating point type.",null,null],[10,"to_float","","Convert usize to float.",18,null],[11,"clone","","",19,null],[11,"new","","Create a new **FlatTuples**.",19,{"inputs":[{"name":"i"}],"output":{"name":"self"}}],[11,"next","","",19,null],[11,"size_hint","","",19,null],[11,"next_back","","",19,null],[11,"new","itertools","Create a new RcIter.",0,{"inputs":[{"name":"i"}],"output":{"name":"rciter"}}],[11,"clone","","",0,null],[11,"next","","",0,null],[11,"size_hint","","",0,null],[11,"next_back","","",0,null],[11,"new","","Create a new **RepeatN** with **n** repetitions.",20,{"inputs":[{"name":"a"},{"name":"usize"}],"output":{"name":"self"}}],[11,"next","","",20,null],[11,"size_hint","","",20,null],[11,"next_back","","",20,null],[0,"size_hint","","Arithmetic on **Iterator** *.size_hint()* values.",null,null],[5,"add_scalar","itertools::size_hint","Add **x** correctly to a **SizeHint**.",null,{"inputs":[{"name":"sizehint"},{"name":"usize"}],"output":{"name":"sizehint"}}],[5,"add","","Add **SizeHint** correctly.",null,{"inputs":[{"name":"sizehint"},{"name":"sizehint"}],"output":{"name":"sizehint"}}],[5,"mul_scalar","","Multiply **x** correctly with a **SizeHint**.",null,{"inputs":[{"name":"sizehint"},{"name":"usize"}],"output":{"name":"sizehint"}}],[5,"mul","","Multiply **SizeHint** correctly",null,{"inputs":[{"name":"sizehint"},{"name":"sizehint"}],"output":{"name":"sizehint"}}],[5,"max","","Return the maximum",null,{"inputs":[{"name":"sizehint"},{"name":"sizehint"}],"output":{"name":"sizehint"}}],[5,"min","","Return the minimum",null,{"inputs":[{"name":"sizehint"},{"name":"sizehint"}],"output":{"name":"sizehint"}}],[6,"SizeHint","","**SizeHint** is the return type of **Iterator::size_hint()**.",null,null],[11,"from_ptr_len","itertools","Create a Stride iterator from a raw pointer.",21,null],[11,"from_ptr_len","","Create a StrideMut iterator from a raw pointer.",22,null],[11,"from_slice","","Create Stride iterator from a slice and the element step count.",21,null],[11,"from_stride","","Create Stride iterator from an existing Stride iterator",21,{"inputs":[{"name":"stride"},{"name":"isize"}],"output":{"name":"stride"}}],[11,"swap_ends","","Swap the begin and end and reverse the stride,\nin effect reversing the iterator.",21,null],[11,"len","","Return the number of elements in the iterator.",21,null],[11,"next","","",21,null],[11,"size_hint","","",21,null],[11,"next_back","","",21,null],[11,"index","","Return a reference to the element at a given index.",21,null],[11,"fmt","","",21,null],[11,"from_slice","","Create Stride iterator from a slice and the element step count.",22,null],[11,"from_stride","","Create Stride iterator from an existing Stride iterator",22,{"inputs":[{"name":"stridemut"},{"name":"isize"}],"output":{"name":"stridemut"}}],[11,"swap_ends","","Swap the begin and end and reverse the stride,\nin effect reversing the iterator.",22,null],[11,"len","","Return the number of elements in the iterator.",22,null],[11,"next","","",22,null],[11,"size_hint","","",22,null],[11,"next_back","","",22,null],[11,"index","","Return a reference to the element at a given index.",22,null],[11,"fmt","","",22,null],[11,"clone","","",21,null],[11,"index_mut","","Return a mutable reference to the element at a given index.",22,null],[11,"next","","",23,null],[11,"size_hint","","",23,null],[11,"clone","","",24,null],[11,"next","","",24,null],[11,"size_hint","","",24,null],[11,"next_back","","",24,null],[11,"clone","","",25,null],[11,"new","","Create a new **ZipLongest** iterator.",25,{"inputs":[{"name":"t"},{"name":"u"}],"output":{"name":"ziplongest"}}],[11,"next","","",25,null],[11,"size_hint","","",25,null],[11,"next_back","","",25,null],[11,"fmt","","",1,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"clone","","",1,null],[11,"clone","","",26,null],[11,"new","","Create a new **Zip** from a tuple of iterators.",26,{"inputs":[{"name":"t"}],"output":{"name":"zip"}}],[11,"next","","",26,null],[11,"size_hint","","",26,null],[11,"next","","",26,null],[11,"size_hint","","",26,null],[11,"next","","",26,null],[11,"size_hint","","",26,null],[11,"next","","",26,null],[11,"size_hint","","",26,null],[11,"next","","",26,null],[11,"size_hint","","",26,null],[11,"next","","",26,null],[11,"size_hint","","",26,null],[11,"next","","",26,null],[11,"size_hint","","",26,null],[11,"next","","",26,null],[11,"size_hint","","",26,null],[11,"next","","",26,null],[11,"size_hint","","",26,null],[6,"MergeAscend","","An ascending order merge iterator created with *.merge()*.",null,null],[8,"Itertools","","Extra iterator methods for arbitrary iterators",null,null],[11,"fn_map","","Like regular *.map()*, but using a simple function pointer instead,\nso that the resulting **FnMap** iterator value can be cloned.",27,null],[11,"interleave","","Alternate elements from two iterators until both\nrun out.",27,null],[11,"intersperse","","An iterator adaptor to insert a particular value\nbetween each element of the adapted iterator.",27,null],[11,"zip_longest","","Create an iterator which iterates over both this and the specified\niterator simultaneously, yielding pairs of two optional elements.",27,null],[11,"dedup","","Remove duplicates from sections of consecutive identical elements.\nIf the iterator is sorted, all elements will be unique.",27,null],[11,"batching","","A “meta iterator adaptor”. Its closure recives a reference to the iterator\nand may pick off as many elements as it likes, to produce the next iterator element.",27,null],[11,"group_by","","Group iterator elements. Consecutive elements that map to the same key (“runs”),\nare returned as the iterator elements of **GroupBy**.",27,null],[11,"tee","","Split into an iterator pair that both yield all elements from\nthe original iterator.",27,null],[11,"slice","","Return a sliced iterator.",27,null],[11,"into_rc","","Return an iterator inside a **Rc\\<RefCell\\<_\\>\\>** wrapper.",27,null],[11,"step","","Return an iterator adaptor that steps **n** elements in the base iterator\nfor each iteration.",27,null],[11,"merge","","Return an iterator adaptor that merges the two base iterators in ascending order.\nIf both base iterators are sorted (ascending), the result is sorted.",27,null],[11,"merge_by","","Return an iterator adaptor that merges the two base iterators in order.\nThis is much like *.merge()* but allows for a custom ordering.",27,null],[11,"cartesian_product","","Return an iterator adaptor that iterates over the cartesian product of\nthe element sets of two iterators **self** and **J**.",27,null],[11,"multipeek","","Returns an iterator adapter that allows peeking multiple values.",27,null],[11,"find_position","","Find the position and value of the first element satisfying a predicate.",27,null],[11,"dropn","","Consume the first **n** elements of the iterator eagerly.",27,null],[11,"dropping","","Consume the first **n** elements from the iterator eagerly,\nand return the same iterator again.",27,null],[11,"dropping_back","","Consume the last **n** elements from the iterator eagerly,\nand return the same iterator again.",27,null],[11,"foreach","","Run the closure **f** eagerly on each element of the iterator.",27,null],[11,"collect_vec","","**.collect_vec()** is simply a type specialization of **.collect()**,\nfor convenience.",27,null],[11,"set_from","","Assign to each reference in **self** from the **from** iterator,\nstopping at the shortest of the two iterators.",27,null],[11,"join","","Combine all iterator elements into one String, seperated by **sep**.",27,null],[11,"fold_results","","Fold **Result** values from an iterator.",27,null],[11,"fold1","","Accumulator of the elements in the iterator.",27,null],[11,"is_empty_hint","","Tell if the iterator is empty or not according to its size hint.\nReturn **None** if the size hint does not tell, or return a **Some**\nvalue with the emptiness if it's possible to tell.",27,null],[14,"iproduct!","","Create an iterator over the “cartesian product” of iterators.",null,null],[14,"izip!","","Create an iterator running multiple iterators in lockstep.",null,null],[14,"icompr!","","`icompr` as in “iterator comprehension” allows creating a\nmapped iterator with simple syntax, similar to set builder notation,\nand directly inspired by Python. Supports an optional filter clause.",null,null]],"paths":[[3,"RcIter"],[4,"EitherOrBoth"],[3,"Interleave"],[3,"FnMap"],[3,"PutBack"],[3,"Product"],[3,"Dedup"],[3,"Batching"],[3,"GroupBy"],[3,"Step"],[3,"Merge"],[3,"MultiPeek"],[3,"Intersperse"],[3,"ISlice"],[3,"Linspace"],[8,"IntoIteratorTuple"],[8,"AppendTuple"],[8,"GenericRange"],[8,"ToFloat"],[3,"FlatTuples"],[3,"RepeatN"],[3,"Stride"],[3,"StrideMut"],[3,"Tee"],[3,"Times"],[3,"ZipLongest"],[3,"Zip"],[8,"Itertools"]]}; initSearch(searchIndex);