Safe HaskellNone

LSC.Cartesian

Documentation

class (Bifunctor f, Bifoldable f, Integral x, Integral y) => Cartesian f x y where Source #

Minimal complete definition

Nothing

Methods

moveX :: x -> f x y -> f x y Source #

moveY :: y -> f x y -> f x y Source #

width :: f x y -> x Source #

height :: f x y -> y Source #

center :: f x y -> (x, y) Source #

centerX :: f x y -> x Source #

centerY :: f x y -> y Source #

relocateX :: x -> f x y -> f x y Source #

relocateY :: y -> f x y -> f x y Source #

minX :: f x y -> x Source #

maxX :: f x y -> x Source #

minY :: f x y -> y Source #

maxY :: f x y -> y Source #

relocateL :: x -> f x y -> f x y Source #

relocateR :: x -> f x y -> f x y Source #

relocateB :: y -> f x y -> f x y Source #

relocateT :: y -> f x y -> f x y Source #

abscissae :: f x y -> [x] Source #

ordinates :: f x y -> [y] Source #

Instances

Instances details
(Integral x, Integral y) => Cartesian (,) x y Source # 
Instance details

Defined in LSC.Cartesian

Methods

moveX :: x -> (x, y) -> (x, y) Source #

moveY :: y -> (x, y) -> (x, y) Source #

width :: (x, y) -> x Source #

height :: (x, y) -> y Source #

center :: (x, y) -> (x, y) Source #

centerX :: (x, y) -> x Source #

centerY :: (x, y) -> y Source #

relocateX :: x -> (x, y) -> (x, y) Source #

relocateY :: y -> (x, y) -> (x, y) Source #

minX :: (x, y) -> x Source #

maxX :: (x, y) -> x Source #

minY :: (x, y) -> y Source #

maxY :: (x, y) -> y Source #

relocateL :: x -> (x, y) -> (x, y) Source #

relocateR :: x -> (x, y) -> (x, y) Source #

relocateB :: y -> (x, y) -> (x, y) Source #

relocateT :: y -> (x, y) -> (x, y) Source #

abscissae :: (x, y) -> [x] Source #

ordinates :: (x, y) -> [y] Source #

(Integral x, Integral y) => Cartesian Line x y Source # 
Instance details

Defined in LSC.Cartesian

Methods

moveX :: x -> Line x y -> Line x y Source #

moveY :: y -> Line x y -> Line x y Source #

width :: Line x y -> x Source #

height :: Line x y -> y Source #

center :: Line x y -> (x, y) Source #

centerX :: Line x y -> x Source #

centerY :: Line x y -> y Source #

relocateX :: x -> Line x y -> Line x y Source #

relocateY :: y -> Line x y -> Line x y Source #

minX :: Line x y -> x Source #

maxX :: Line x y -> x Source #

minY :: Line x y -> y Source #

maxY :: Line x y -> y Source #

relocateL :: x -> Line x y -> Line x y Source #

relocateR :: x -> Line x y -> Line x y Source #

relocateB :: y -> Line x y -> Line x y Source #

relocateT :: y -> Line x y -> Line x y Source #

abscissae :: Line x y -> [x] Source #

ordinates :: Line x y -> [y] Source #

(Integral x, Integral y) => Cartesian (Component l) x y Source # 
Instance details

Defined in LSC.Component

Methods

moveX :: x -> Component l x y -> Component l x y Source #

moveY :: y -> Component l x y -> Component l x y Source #

width :: Component l x y -> x Source #

height :: Component l x y -> y Source #

center :: Component l x y -> (x, y) Source #

centerX :: Component l x y -> x Source #

centerY :: Component l x y -> y Source #

relocateX :: x -> Component l x y -> Component l x y Source #

relocateY :: y -> Component l x y -> Component l x y Source #

minX :: Component l x y -> x Source #

maxX :: Component l x y -> x Source #

minY :: Component l x y -> y Source #

maxY :: Component l x y -> y Source #

relocateL :: x -> Component l x y -> Component l x y Source #

relocateR :: x -> Component l x y -> Component l x y Source #

relocateB :: y -> Component l x y -> Component l x y Source #

relocateT :: y -> Component l x y -> Component l x y Source #

abscissae :: Component l x y -> [x] Source #

ordinates :: Component l x y -> [y] Source #

(Integral x, Integral y) => Cartesian (BoundingBox l) x y Source # 
Instance details

Defined in LSC.Component

Methods

moveX :: x -> BoundingBox l x y -> BoundingBox l x y Source #

moveY :: y -> BoundingBox l x y -> BoundingBox l x y Source #

width :: BoundingBox l x y -> x Source #

height :: BoundingBox l x y -> y Source #

center :: BoundingBox l x y -> (x, y) Source #

centerX :: BoundingBox l x y -> x Source #

centerY :: BoundingBox l x y -> y Source #

relocateX :: x -> BoundingBox l x y -> BoundingBox l x y Source #

relocateY :: y -> BoundingBox l x y -> BoundingBox l x y Source #

minX :: BoundingBox l x y -> x Source #

maxX :: BoundingBox l x y -> x Source #

minY :: BoundingBox l x y -> y Source #

maxY :: BoundingBox l x y -> y Source #

relocateL :: x -> BoundingBox l x y -> BoundingBox l x y Source #

relocateR :: x -> BoundingBox l x y -> BoundingBox l x y Source #

relocateB :: y -> BoundingBox l x y -> BoundingBox l x y Source #

relocateT :: y -> BoundingBox l x y -> BoundingBox l x y Source #

abscissae :: BoundingBox l x y -> [x] Source #

ordinates :: BoundingBox l x y -> [y] Source #

(Integral x, Integral y) => Cartesian (Overlap l) x y Source # 
Instance details

Defined in LSC.Component

Methods

moveX :: x -> Overlap l x y -> Overlap l x y Source #

moveY :: y -> Overlap l x y -> Overlap l x y Source #

width :: Overlap l x y -> x Source #

height :: Overlap l x y -> y Source #

center :: Overlap l x y -> (x, y) Source #

centerX :: Overlap l x y -> x Source #

centerY :: Overlap l x y -> y Source #

relocateX :: x -> Overlap l x y -> Overlap l x y Source #

relocateY :: y -> Overlap l x y -> Overlap l x y Source #

minX :: Overlap l x y -> x Source #

maxX :: Overlap l x y -> x Source #

minY :: Overlap l x y -> y Source #

maxY :: Overlap l x y -> y Source #

relocateL :: x -> Overlap l x y -> Overlap l x y Source #

relocateR :: x -> Overlap l x y -> Overlap l x y Source #

relocateB :: y -> Overlap l x y -> Overlap l x y Source #

relocateT :: y -> Overlap l x y -> Overlap l x y Source #

abscissae :: Overlap l x y -> [x] Source #

ordinates :: Overlap l x y -> [y] Source #

(Integral x, Integral y) => Cartesian (Polygon l) x y Source # 
Instance details

Defined in LSC.Polygon

Methods

moveX :: x -> Polygon l x y -> Polygon l x y Source #

moveY :: y -> Polygon l x y -> Polygon l x y Source #

width :: Polygon l x y -> x Source #

height :: Polygon l x y -> y Source #

center :: Polygon l x y -> (x, y) Source #

centerX :: Polygon l x y -> x Source #

centerY :: Polygon l x y -> y Source #

relocateX :: x -> Polygon l x y -> Polygon l x y Source #

relocateY :: y -> Polygon l x y -> Polygon l x y Source #

minX :: Polygon l x y -> x Source #

maxX :: Polygon l x y -> x Source #

minY :: Polygon l x y -> y Source #

maxY :: Polygon l x y -> y Source #

relocateL :: x -> Polygon l x y -> Polygon l x y Source #

relocateR :: x -> Polygon l x y -> Polygon l x y Source #

relocateB :: y -> Polygon l x y -> Polygon l x y Source #

relocateT :: y -> Polygon l x y -> Polygon l x y Source #

abscissae :: Polygon l x y -> [x] Source #

ordinates :: Polygon l x y -> [y] Source #

Cartesian f x y => Cartesian (Quadtree a f) x y Source # 
Instance details

Defined in LSC.Quadtree

Methods

moveX :: x -> Quadtree a f x y -> Quadtree a f x y Source #

moveY :: y -> Quadtree a f x y -> Quadtree a f x y Source #

width :: Quadtree a f x y -> x Source #

height :: Quadtree a f x y -> y Source #

center :: Quadtree a f x y -> (x, y) Source #

centerX :: Quadtree a f x y -> x Source #

centerY :: Quadtree a f x y -> y Source #

relocateX :: x -> Quadtree a f x y -> Quadtree a f x y Source #

relocateY :: y -> Quadtree a f x y -> Quadtree a f x y Source #

minX :: Quadtree a f x y -> x Source #

maxX :: Quadtree a f x y -> x Source #

minY :: Quadtree a f x y -> y Source #

maxY :: Quadtree a f x y -> y Source #

relocateL :: x -> Quadtree a f x y -> Quadtree a f x y Source #

relocateR :: x -> Quadtree a f x y -> Quadtree a f x y Source #

relocateB :: y -> Quadtree a f x y -> Quadtree a f x y Source #

relocateT :: y -> Quadtree a f x y -> Quadtree a f x y Source #

abscissae :: Quadtree a f x y -> [x] Source #

ordinates :: Quadtree a f x y -> [y] Source #

data Line x y Source #

Constructors

Line (x, y) (x, y) 

Instances

Instances details
Bifunctor Line Source # 
Instance details

Defined in LSC.Cartesian

Methods

bimap :: (a -> b) -> (c -> d) -> Line a c -> Line b d

first :: (a -> b) -> Line a c -> Line b c

second :: (b -> c) -> Line a b -> Line a c

Bifoldable Line Source # 
Instance details

Defined in LSC.Cartesian

Methods

bifold :: Monoid m => Line m m -> m

bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> Line a b -> m

bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> Line a b -> c

bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> Line a b -> c

(Integral x, Integral y) => Cartesian Line x y Source # 
Instance details

Defined in LSC.Cartesian

Methods

moveX :: x -> Line x y -> Line x y Source #

moveY :: y -> Line x y -> Line x y Source #

width :: Line x y -> x Source #

height :: Line x y -> y Source #

center :: Line x y -> (x, y) Source #

centerX :: Line x y -> x Source #

centerY :: Line x y -> y Source #

relocateX :: x -> Line x y -> Line x y Source #

relocateY :: y -> Line x y -> Line x y Source #

minX :: Line x y -> x Source #

maxX :: Line x y -> x Source #

minY :: Line x y -> y Source #

maxY :: Line x y -> y Source #

relocateL :: x -> Line x y -> Line x y Source #

relocateR :: x -> Line x y -> Line x y Source #

relocateB :: y -> Line x y -> Line x y Source #

relocateT :: y -> Line x y -> Line x y Source #

abscissae :: Line x y -> [x] Source #

ordinates :: Line x y -> [y] Source #

HasNetSegments Net [Line' Int] Source # 
Instance details

Defined in LSC.Model

Methods

netSegments :: Lens' Net [Line' Int] Source #

Functor (Line x) Source # 
Instance details

Defined in LSC.Cartesian

Methods

fmap :: (a -> b) -> Line x a -> Line x b

(<$) :: a -> Line x b -> Line x a

Foldable (Line x) Source # 
Instance details

Defined in LSC.Cartesian

Methods

fold :: Monoid m => Line x m -> m

foldMap :: Monoid m => (a -> m) -> Line x a -> m

foldMap' :: Monoid m => (a -> m) -> Line x a -> m

foldr :: (a -> b -> b) -> b -> Line x a -> b

foldr' :: (a -> b -> b) -> b -> Line x a -> b

foldl :: (b -> a -> b) -> b -> Line x a -> b

foldl' :: (b -> a -> b) -> b -> Line x a -> b

foldr1 :: (a -> a -> a) -> Line x a -> a

foldl1 :: (a -> a -> a) -> Line x a -> a

toList :: Line x a -> [a]

null :: Line x a -> Bool

length :: Line x a -> Int

elem :: Eq a => a -> Line x a -> Bool

maximum :: Ord a => Line x a -> a

minimum :: Ord a => Line x a -> a

sum :: Num a => Line x a -> a

product :: Num a => Line x a -> a

(Eq x, Eq y) => Eq (Line x y) Source # 
Instance details

Defined in LSC.Cartesian

Methods

(==) :: Line x y -> Line x y -> Bool

(/=) :: Line x y -> Line x y -> Bool

(Ord x, Ord y) => Ord (Line x y) Source # 
Instance details

Defined in LSC.Cartesian

Methods

compare :: Line x y -> Line x y -> Ordering

(<) :: Line x y -> Line x y -> Bool

(<=) :: Line x y -> Line x y -> Bool

(>) :: Line x y -> Line x y -> Bool

(>=) :: Line x y -> Line x y -> Bool

max :: Line x y -> Line x y -> Line x y

min :: Line x y -> Line x y -> Line x y

(Show x, Show y) => Show (Line x y) Source # 
Instance details

Defined in LSC.Cartesian

Methods

showsPrec :: Int -> Line x y -> ShowS

show :: Line x y -> String

showList :: [Line x y] -> ShowS

Generic (Line x y) Source # 
Instance details

Defined in LSC.Cartesian

Associated Types

type Rep (Line x y) :: Type -> Type

Methods

from :: Line x y -> Rep (Line x y) x0

to :: Rep (Line x y) x0 -> Line x y

(NFData x, NFData y) => NFData (Line x y) Source # 
Instance details

Defined in LSC.Cartesian

Methods

rnf :: Line x y -> ()

(FromJSON x, FromJSON y) => FromJSON (Line x y) Source # 
Instance details

Defined in LSC.Cartesian

Methods

parseJSON :: Value -> Parser (Line x y)

parseJSONList :: Value -> Parser [Line x y]

(ToJSON x, ToJSON y) => ToJSON (Line x y) Source # 
Instance details

Defined in LSC.Cartesian

Methods

toJSON :: Line x y -> Value

toEncoding :: Line x y -> Encoding

toJSONList :: [Line x y] -> Value

toEncodingList :: [Line x y] -> Encoding

type Rep (Line x y) Source # 
Instance details

Defined in LSC.Cartesian

type Rep (Line x y) = D1 ('MetaData "Line" "LSC.Cartesian" "main" 'False) (C1 ('MetaCons "Line" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (x, y)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (x, y))))

type Line' a = Line a a Source #

line :: Iso' ((x, y), (x, y)) (Line x y) Source #