Safe Haskell | None |
---|---|
Language | Haskell2010 |
- Tables of symmetry classes
- type SymRepr a = RawCoord a
- type SymClass' = Int
- newtype SymClass symType a = SymClass {}
- type SymCoord sym a = (SymClass sym a, SymCode sym)
- type SymCoord' = Int
- type SymOrder' = Int
- newtype Action s a = Action [a -> a]
- newtype SymClassTable s a = SymClassTable {}
- newtype SymReprTable s a = SymReprTable {}
- newtype SymMove s a = SymMove (Vector SymCoord')
- type Symmetries sym a = MoveTag sym (Vector (RawMove a))
- symClasses :: RawEncodable a => Action s a -> SymClassTable s a
- symClasses' :: forall a s. RawEncodable a => Action s a -> [RawCoord a]
- symClassTable :: Int -> SymReprTable s a -> SymClassTable s a
- symReprTable :: forall a s t. (RawEncodable a, Foldable t) => Int -> (RawCoord a -> t (RawCoord a)) -> SymReprTable s a
- symReprTable' :: Foldable t => Int -> Int -> (Int -> t Int) -> Vector Int
- symMoveTable :: RawEncodable a => Action s a -> SymClassTable s a -> (a -> a) -> SymMove s a
- symMoveTable' :: RawEncodable a => Int -> SymReprTable s a -> SymClassTable s a -> (a -> a) -> SymMove s a
- symMove :: SymOrder' -> SymMove s a -> SymClass s a -> SymCoord s a
- symMove' :: SymOrder' -> SymMove sym a -> (SymClass sym a, SymCode sym) -> (SymClass sym a, SymCode sym)
- reprToClass :: SymClassTable s a -> RawCoord a -> SymClass s a
- symCoord :: RawEncodable a => Action s a -> SymClassTable s a -> a -> SymCoord s a
- symCoord' :: Int -> SymReprTable s a -> SymClassTable s a -> RawCoord a -> SymCoord s a
- symToRaw :: SymClassTable s a -> (RawCoord a -> SymCode s -> RawCoord a) -> SymCoord s a -> RawCoord a
- sym :: Symmetries s a -> RawCoord a -> SymCode s -> RawCoord a
Documentation
type SymRepr a = RawCoord a Source
Smallest representative of a symmetry class. (An element of the symClasses table)
newtype SymClass symType a Source
Symmetry class. (Index of the smallest representative in the symClasses table)
An Int
representing a pair (Repr, Sym)
.
If x = symClass * symOrder + symCode
,
where symClass :: SymClass
is the index of the symmetry class with
smallest representative r :: SymRepr
(for an arbitrary order relation),
symOrder
is the size of the symmetry group,
symCode :: Sym
is the index of a symmetry s
;
then s^(-1) <> r <> s
is the value represented by x
.
newtype SymClassTable s a Source
Eq (SymClassTable s a) Source | |
Ord (SymClassTable s a) Source | |
Show (SymClassTable s a) Source | |
NFData (SymClassTable s a) Source | |
Binary (SymClassTable s a) Source |
newtype SymReprTable s a Source
Eq (SymReprTable s a) Source | |
Ord (SymReprTable s a) Source | |
Show (SymReprTable s a) Source | |
NFData (SymReprTable s a) Source | |
Binary (SymReprTable s a) Source |
type Symmetries sym a = MoveTag sym (Vector (RawMove a)) Source
:: RawEncodable a | |
=> Action s a | Symmetry group, including the identity,
- represented by its action on |
-> SymClassTable s a | Smallest representative |
Compute the table of smallest representatives for all symmetry classes.
The RawCoord'
coordinate of that representative is a Repr
.
The table is sorted in increasing order.
symClasses' :: forall a s. RawEncodable a => Action s a -> [RawCoord a] Source
symClassTable :: Int -> SymReprTable s a -> SymClassTable s a Source
:: (RawEncodable a, Foldable t) | |
=> Int | Number of symmetries |
-> (RawCoord a -> t (RawCoord a)) | |
-> SymReprTable s a |
:: Foldable t | |
=> Int | Number of elements |
-> Int | Number of symmetries |
-> (Int -> t Int) |
|
-> Vector Int |
f x !! i == y. |
:: RawEncodable a | |
=> Action s a | Symmetry group |
-> SymClassTable s a | (Sorted) table of representatives |
-> (a -> a) | Endofunction to encode |
-> SymMove s a |
:: RawEncodable a | |
=> Int | Symmetry group order |
-> SymReprTable s a | |
-> SymClassTable s a | |
-> (a -> a) | |
-> SymMove s a |
symMove' :: SymOrder' -> SymMove sym a -> (SymClass sym a, SymCode sym) -> (SymClass sym a, SymCode sym) Source
reprToClass :: SymClassTable s a -> RawCoord a -> SymClass s a Source
symCoord :: RawEncodable a => Action s a -> SymClassTable s a -> a -> SymCoord s a Source
Find the representative as the one corresponding to the smallest coordinate
symCoord' :: Int -> SymReprTable s a -> SymClassTable s a -> RawCoord a -> SymCoord s a Source