Skip to content

Commit

Permalink
refactoring the Lower envelope stuff (#236) + progress on planar sepa…
Browse files Browse the repository at this point in the history
…rators

* Upper Hull in R^3 using duality and the native lower envelope algo

* fiddling

* moving MonoidalMap to a separate file + moving Graph into separate file

* refactoring ; splitting the new regions implementation into sub modules

* updated the readme with the new ci

* fix tests

* constructing the triangulated graph :)

* cleaning up

* deleting useless file

* caching

* using restore keys

* one more degenerate testcase

* more work on computing a separator

* refactor path

* finding a node to root path :)

* finding paths

* polishing

* some refactoring and cleaning up

* more separator stuff

* dealing with reoot splits
  • Loading branch information
noinia authored Jul 26, 2024
1 parent b9d2b20 commit bb3fe79
Show file tree
Hide file tree
Showing 21 changed files with 1,852 additions and 333 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/gettested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ jobs:
echo ${{ env.ARCH }}
cabal configure --enable-tests --enable-benchmarks
- name: Install dependencies
run: cabal build --dependencies-only -j2 hgeometry

- name: Cache
uses: actions/cache@v4.0.2
- name: Restore Cache
uses: actions/cache/restore@v4
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}-

- name: Install dependencies
run: cabal build --dependencies-only -j2 hgeometry

- name: Build
run: cabal build all

Expand All @@ -63,3 +63,10 @@ jobs:
- name: haddock
run: |
cabal haddock all
- name: save Cache
uses: actions/cache/save@v4
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}-
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# HGeometry

![GitHub Workflow Status](
https://img.shields.io/github/actions/workflow/status/noinia/hgeometry/haskell-ci.yml?branch=master)
https://img.shields.io/github/actions/workflow/status/noinia/hgeometry/gettested.yml?branch=master)
[![Hackage](https://img.shields.io/hackage/v/hgeometry.svg?color=success)](https://hackage.haskell.org/package/hgeometry)
[![API docs coverage](https://img.shields.io/endpoint?url=https%3A%2F%2Fnoinia.github.io%2Fhgeometry%2Fhaddock_badge.json)](https://noinia.github.io/hgeometry/haddocks)

Expand Down
188 changes: 188 additions & 0 deletions hgeometry/data/test-with-ipe/Plane/LowerEnvelope/degenerate2_out.ipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
<?xml version="1.0" encoding="UTF-8"?>
<ipe version="70005" creator="HGeometry"><ipestyle name="opacities">
<opacity name="10%" value="0.1"/>
<opacity name="20%" value="0.2"/>
<opacity name="30%" value="0.3"/>
<opacity name="40%" value="0.4"/>
<opacity name="50%" value="0.5"/>
<opacity name="60%" value="0.6"/>
<opacity name="70%" value="0.7"/>
<opacity name="80%" value="0.8"/>
<opacity name="90%" value="0.9"/>
</ipestyle><ipestyle name="basic">
<color name="red" value="1 0 0"/>
<color name="green" value="0 1 0"/>
<color name="blue" value="0 0 1"/>
<color name="yellow" value="1 1 0"/>
<color name="orange" value="1 0.647 0"/>
<color name="gold" value="1 0.843 0"/>
<color name="purple" value="0.627 0.125 0.941"/>
<color name="gray" value="0.745 0.745 0.745"/>
<color name="brown" value="0.647 0.165 0.165"/>
<color name="navy" value="0 0 0.502"/>
<color name="pink" value="1 0.753 0.796"/>
<color name="seagreen" value="0.18 0.545 0.341"/>
<color name="turquoise" value="0.251 0.878 0.816"/>
<color name="violet" value="0.933 0.51 0.933"/>
<color name="darkblue" value="0 0 0.545"/>
<color name="darkcyan" value="0 0.545 0.545"/>
<color name="darkgray" value="0.663 0.663 0.663"/>
<color name="darkgreen" value="0 0.392 0"/>
<color name="darkmagenta" value="0.545 0 0.545"/>
<color name="darkorange" value="1 0.549 0"/>
<color name="darkred" value="0.545 0 0"/>
<color name="lightblue" value="0.678 0.847 0.902"/>
<color name="lightcyan" value="0.878 1 1"/>
<color name="lightgray" value="0.827 0.827 0.827"/>
<color name="lightgreen" value="0.565 0.933 0.565"/>
<color name="lightyellow" value="1 1 0.878"/>
<dashstyle name="dashed" value="[4] 0"/>
<dashstyle name="dotted" value="[1 3] 0"/>
<dashstyle name="dash dotted" value="[4 2 1 2] 0"/>
<dashstyle name="dash dot dotted" value="[4 2 1 2 1 2] 0"/>
<pen name="heavier" value="0.8"/>
<pen name="fat" value="1.2"/>
<pen name="ultrafat" value="2"/>
<textsize name="large" value="\large"/>
<textsize name="Large" value="\Large"/>
<textsize name="LARGE" value="\LARGE"/>
<textsize name="huge" value="\huge"/>
<textsize name="Huge" value="\Huge"/>
<textsize name="small" value="\small"/>
<textsize name="footnote" value="\footnotesize"/>
<textsize name="tiny" value="\tiny"/>
<symbolsize name="small" value="2"/>
<symbolsize name="tiny" value="1.1"/>
<symbolsize name="large" value="5"/>
<arrowsize name="small" value="5"/>
<arrowsize name="tiny" value="3"/>
<arrowsize name="large" value="10"/>
<gridsize name="4 pts" value="4"/>
<gridsize name="8 pts (~3 mm)" value="8"/>
<gridsize name="16 pts (~6 mm)" value="16"/>
<gridsize name="32 pts (~12 mm)" value="32"/>
<gridsize name="10 pts (~3.5 mm)" value="10"/>
<gridsize name="20 pts (~7 mm)" value="20"/>
<gridsize name="14 pts (~5 mm)" value="14"/>
<gridsize name="28 pts (~10 mm)" value="28"/>
<gridsize name="56 pts (~20 mm)" value="56"/>
<anglesize name="90 deg" value="90"/>
<anglesize name="60 deg" value="60"/>
<anglesize name="45 deg" value="45"/>
<anglesize name="30 deg" value="30"/>
<anglesize name="22.5 deg" value="22.5"/>
<symbol name="mark/circle(sx)" transformations="translations">
<path fill="sym-stroke">
0.6 0 0 0.6 0 0 e 0.4 0 0 0.4 0 0 e
</path></symbol>
<symbol name="mark/disk(sx)" transformations="translations">
<path fill="sym-stroke">
0.6 0 0 0.6 0 0 e
</path></symbol>
<symbol name="mark/fdisk(sfx)" transformations="translations">
<group><path fill="sym-fill">
0.5 0 0 0.5 0 0 e
</path><path fill="sym-stroke" fillrule="eofill">
0.6 0 0 0.6 0 0 e 0.4 0 0 0.4 0 0 e
</path></group></symbol>
<symbol name="mark/box(sx)" transformations="translations">
<path fill="sym-stroke" fillrule="eofill">
-0.6 -0.6 m 0.6 -0.6 l 0.6 0.6 l -0.6 0.6 l h
-0.4 -0.4 m 0.4 -0.4 l 0.4 0.4 l -0.4 0.4 l h</path></symbol>
<symbol name="mark/square(sx)" transformations="translations">
<path fill="sym-stroke">
-0.6 -0.6 m 0.6 -0.6 l 0.6 0.6 l -0.6 0.6 l h</path></symbol>
<symbol name="mark/fsquare(sfx)" transformations="translations">
<group><path fill="sym-fill">
-0.5 -0.5 m 0.5 -0.5 l 0.5 0.5 l -0.5 0.5 l h</path>
<path fill="sym-stroke" fillrule="eofill">
-0.6 -0.6 m 0.6 -0.6 l 0.6 0.6 l -0.6 0.6 l h
-0.4 -0.4 m 0.4 -0.4 l 0.4 0.4 l -0.4 0.4 l h</path></group></symbol>
<symbol name="mark/cross(sx)" transformations="translations">
<group><path fill="sym-stroke">
-0.43 -0.57 m 0.57 0.43 l 0.43 0.57 l -0.57 -0.43 l h</path>
<path fill="sym-stroke">
-0.43 0.57 m 0.57 -0.43 l 0.43 -0.57 l -0.57 0.43 l h</path>
</group></symbol>
<symbol name="arrow/arc(spx)">
<path pen="sym-pen" stroke="sym-stroke" fill="sym-stroke">
0 0 m -1.0 0.333 l -1.0 -0.333 l h</path></symbol>
<symbol name="arrow/farc(spx)">
<path pen="sym-pen" stroke="sym-stroke" fill="white">
0 0 m -1.0 0.333 l -1.0 -0.333 l h</path></symbol>
<symbol name="arrow/ptarc(spx)">
<path pen="sym-pen" stroke="sym-stroke" fill="sym-stroke">
0 0 m -1.0 0.333 l -0.8 0 l -1.0 -0.333 l h</path></symbol>
<symbol name="arrow/fptarc(spx)">
<path pen="sym-pen" stroke="sym-stroke" fill="white">
0 0 m -1.0 0.333 l -0.8 0 l -1.0 -0.333 l h</path></symbol>
<symbol name="arrow/fnormal(spx)">
<path pen="sym-pen" stroke="sym-stroke" fill="white">
0 0 m -1.0 0.333 l -1.0 -0.333 l h</path></symbol>
<symbol name="arrow/pointed(spx)">
<path pen="sym-pen" stroke="sym-stroke" fill="sym-stroke">
0 0 m -1.0 0.333 l -0.8 0 l -1.0 -0.333 l h</path></symbol>
<symbol name="arrow/fpointed(spx)">
<path pen="sym-pen" stroke="sym-stroke" fill="white">
0 0 m -1.0 0.333 l -0.8 0 l -1.0 -0.333 l h</path></symbol>
<symbol name="arrow/linear(spx)">
<path pen="sym-pen" stroke="sym-stroke">
-1.0 0.333 m 0 0 l -1.0 -0.333 l</path></symbol>
<symbol name="arrow/fdouble(spx)">
<path pen="sym-pen" stroke="sym-stroke" fill="white">
0 0 m -1.0 0.333 l -1.0 -0.333 l h
-1 0 m -2.0 0.333 l -2.0 -0.333 l h
</path></symbol>
<symbol name="arrow/double(spx)">
<path pen="sym-pen" stroke="sym-stroke" fill="sym-stroke">
0 0 m -1.0 0.333 l -1.0 -0.333 l h
-1 0 m -2.0 0.333 l -2.0 -0.333 l h
</path></symbol>
<tiling name="falling" angle="-60" width="1" step="4"/>
<tiling name="rising" angle="30" width="1" step="4"/>
<textstyle name="center" begin="\begin{center}" end="\end{center}"/>
<textstyle name="itemize" begin="\begin{itemize}" end="\end{itemize}"/>
<textstyle name="item" begin="\begin{itemize}\item{}" end="\end{itemize}"/>
</ipestyle><page><layer name="alpha"/><view layers="alpha" active="alpha"/><group><use stroke="black" size="normal" pos="82.745200000000 173.255000000000" name="mark/disk(sx)"/><use stroke="black" size="normal" pos="128.000000000000 192.000000000000" name="mark/disk(sx)"/><use stroke="black" size="normal" pos="173.255000000000 173.255000000000" name="mark/disk(sx)"/><use stroke="black" size="normal" pos="192.000000000000 128.000000000000" name="mark/disk(sx)"/><use stroke="black" size="normal" pos="173.255000000000 82.745200000000" name="mark/disk(sx)"/><use stroke="black" size="normal" pos="128.000000000000 64.000000000000" name="mark/disk(sx)"/><use stroke="black" size="normal" pos="82.745200000000 82.745200000000" name="mark/disk(sx)"/><use stroke="black" size="normal" pos="64.000000000000 128.000000000000" name="mark/disk(sx)"/></group><group><group><use stroke="green" pos="192.000000000000 128.000000000000" name="mark/disk(sx)"/><path fill="green" opacity="10%">1128.000225351379 -286.210430677666 m
1128.000566767257 542.208941532476 l
128.000566767257 128.000566767257 l
128.000019914361 128.000019914361 l
128.000048077500 127.999951922500 l
128.000225351379 127.999774648620 l
h
</path></group><group><use stroke="blue" pos="173.255000000000 173.255000000000" name="mark/disk(sx)"/><path fill="blue" opacity="10%">1128.000566767257 542.208941532476 m
1128.000566767257 2542.244365113483 l
128.000566767257 128.000566767257 l
h
</path></group><group><use stroke="yellow" pos="173.255000000000 82.745200000000" name="mark/disk(sx)"/><path fill="yellow" opacity="10%">1128.000225351379 -2286.218265169573 m
1128.000225351379 -286.210430677666 l
128.000225351379 127.999774648620 l
h
</path></group><group><use stroke="orange" pos="128.000000000000 192.000000000000" name="mark/disk(sx)"/><path fill="orange" opacity="10%">1128.000566767257 2542.244365113483 m
-872.000225351380 2542.233354185735 l
127.999774648620 128.000225351379 l
127.999951922500 128.000048077500 l
128.000019914361 128.000019914361 l
128.000566767257 128.000566767257 l
h
</path></group><group><use stroke="gold" pos="128.000000000000 64.000000000000" name="mark/disk(sx)"/><path fill="gold" opacity="10%">-871.999951922500 -2286.207418497661 m
1128.000225351379 -2286.218265169573 l
128.000225351379 127.999774648620 l
128.000048077500 127.999951922500 l
h
</path></group><group><use stroke="purple" pos="82.745200000000 173.255000000000" name="mark/disk(sx)"/><path fill="purple" opacity="10%">-872.000225351380 2542.233354185735 m
-872.000225351380 542.213019517769 l
127.999774648620 128.000225351379 l
h
</path></group><group><use stroke="gray" pos="82.745200000000 82.745200000000" name="mark/disk(sx)"/><path fill="gray" opacity="10%">-872.000048077500 -286.214576669489 m
-871.999951922500 -2286.207418497661 l
128.000048077500 127.999951922500 l
128.000019914361 128.000019914361 l
127.999951922500 128.000048077500 l
h
</path></group><group><use stroke="brown" pos="64.000000000000 128.000000000000" name="mark/disk(sx)"/><path fill="brown" opacity="10%">-872.000225351380 542.213019517769 m
-872.000048077500 -286.214576669489 l
127.999951922500 128.000048077500 l
127.999774648620 128.000225351379 l
h
</path></group></group><use stroke="red" pos="127.999774648620 128.000225351379" name="mark/disk(sx)"/><use stroke="red" pos="127.999951922500 128.000048077500" name="mark/disk(sx)"/><use stroke="red" pos="128.000019914361 128.000019914361" name="mark/disk(sx)"/><use stroke="red" pos="128.000048077500 127.999951922500" name="mark/disk(sx)"/><use stroke="red" pos="128.000225351379 127.999774648620" name="mark/disk(sx)"/><use stroke="red" pos="128.000566767257 128.000566767257" name="mark/disk(sx)"/></page></ipe>
Loading

0 comments on commit bb3fe79

Please sign in to comment.