| Copyright | (c) Jun Narumi 2017-2020 |
|---|---|
| License | BSD3 |
| Maintainer | narumij@gmail.com |
| Stability | experimental |
| Portability | ? |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Matrix.AsXYZ
Description
Read and Display Jones-Faithful notation for spacegroup (e.g. 'x,y,z') and planegroup (e.g. 'x,y')
Synopsis
- fromXYZ :: Integral a => String -> Matrix (Ratio a)
- fromXYZ' :: Integral a => String -> Maybe (Matrix (Ratio a))
- fromABC :: Integral a => String -> Matrix (Ratio a)
- prettyXYZ :: Integral a => Matrix (Ratio a) -> String
- prettyABC :: Integral a => Matrix (Ratio a) -> String
- fromXY :: Integral a => String -> Matrix (Ratio a)
- fromXY' :: Integral a => String -> Maybe (Matrix (Ratio a))
- fromAB :: Integral a => String -> Matrix (Ratio a)
- prettyXY :: Integral a => Matrix (Ratio a) -> String
- prettyAB :: Integral a => Matrix (Ratio a) -> String
Documentation
fromXYZ :: Integral a => String -> Matrix (Ratio a) Source #
Create a matirx from xyz coordinate string of general equivalent position
( 1 % 1 0 % 1 0 % 1 0 % 1 )
( 0 % 1 1 % 1 0 % 1 0 % 1 )
( 0 % 1 0 % 1 1 % 1 0 % 1 )
fromXYZ "x,y,z" :: Matrix Rational = ( 0 % 1 0 % 1 0 % 1 1 % 1 )
( 1 % 1 0 % 1 0 % 1 1 % 2 )
( 0 % 1 1 % 1 0 % 1 1 % 3 )
( 0 % 1 0 % 1 1 % 1 1 % 4 )
fromXYZ "x+1/2,y+1/3,z+1/4" :: Matrix Rational = ( 0 % 1 0 % 1 0 % 1 1 % 1 )
( 1 2 3 4 )
( 5 6 7 8 )
( 9 10 11 12 )
fromXYZ "x+2y+3z+4,5x+6y+7z+8,9x+10y+11z+12" :: Matrix Int = ( 0 0 0 1 )fromABC :: Integral a => String -> Matrix (Ratio a) Source #
It's uses abc instead of xyz
( 1 % 1 0 % 1 0 % 1 0 % 1 )
( 0 % 1 1 % 1 0 % 1 0 % 1 )
( 0 % 1 0 % 1 1 % 1 0 % 1 )
fromXYZ "a,b,c" :: Matrix Rational = ( 0 % 1 0 % 1 0 % 1 1 % 1 )Get the xyz string of matrix
>>>prettyXYZ (identity 4 :: Matrix Rational)"x,y,z"
( 0 % 1 0 % 1 0 % 1 1 % 2 )
( 0 % 1 0 % 1 0 % 1 2 % 3 )
( 0 % 1 0 % 1 0 % 1 4 % 5 )
prettyXYZ ( 0 % 1 0 % 1 0 % 1 1 % 1 ) = "1/2,2/3,4/5"It's uses abc instead of xyz as text format
>>>prettyABC (identity 4 :: Matrix Rational)"a,b,c"
fromXY :: Integral a => String -> Matrix (Ratio a) Source #
Create a matirx from xyz coordinate string of general equivalent position
Get the xyz string of matrix