3.5.4. io.hpp¶
Full path: permutation/io.hpp
-
std::vector<std::vector<std::size_t>>
read_permutation_cycles
(std::istream &s)¶ - Returns
a list of cycles of non-negative numbers parsed from the given stream. It does not necessarily represent a permutation (see the other overload).
- Throws
io_error
on parsing errors.
-
template<typename
Perm
>
voidread_permutation_cycles
(std::istream &s, Perm &p, std::size_t n)¶ -
template<typename
Perm
>
voidread_permutation_cycles
(std::istream &s, Perm &p)¶ -
template<typename
Perm
>
voidread_permutation_cycles
(const std::string &s, Perm &p, std::size_t n)¶ -
template<typename
Perm
>
voidread_permutation_cycles
(const std::string &s, Perm &p)¶ Parse a permutation in cycle notation from a stream or a string (
s
) and store it inp
. Permutations are zero-indexed.The overloads without
n
requiresSizeAwarePermutation<Perm>
, and setsn = perm_group::degree(p)
.
-
template<typename
Perm
>
std::ostream &write_permutation_cycles
(std::ostream &s, const Perm &p, std::size_t n)¶ Write a permutation in cycle notation.
-
template<typename
Perm
>
std::ostream &write_permutation_cycles
(std::ostream &s, const Perm &p)¶ Requires
DegreeAwarePermutation<Perm>
.Write a permutation in cycle notation.