Corner Stitching in Swift @ Base Labs - Krakow
-
Upload
fernando-olivero -
Category
Software
-
view
70 -
download
0
description
Transcript of Corner Stitching in Swift @ Base Labs - Krakow
Corner Stitching in SwiftLightning Talk @ Base Labs
Fernando Olivero
2D Space2D Shapes
Fixed Layout
Row
Column
Grid
Flow
Custom Layout
let point = CGPoint (10,200)
layout.shapeAt(point) ==
let layout =
Layout Protocol
let point = CGPoint (10,200)
layout.shapeAt(point) ==
let shape =
let layout =
Layout Protocol
shape.neighbours() == [ ]
Dynamic ?
Empty space after DELETE ?
Overlapping on INSERT?
Layout Protocol
shapeAt(aPoint)
neighboursOf(aShape)
remove(aShape)
insertShapeAt(aFrame)
Array<Shapes>
Array<Array<Shapes>>
Array<Shapes>
Data Structure
Fixed Layout
Custom Layout
Layout Protocol
Data Structure
Custom Layout
Layout Protocol
Data Structure
O(1) ?O(n) ?0(2^n)?
O(n) ?O(n^2) ?
Solid Tile
Empty Tile
Maximal horizontal rule1
2
as Tall aspossible
NeighboursOf(aShape)
O(#neighbours)
ShapeAt(aPoint)
InsertAt(aFrame,with:aValue)
On Average O(#AreaHeight)
TilesBelow(anArea)
On Average O(#AreaHeight)
Goodies I : Snowplow
O(#Tiles)
Goodies II : Compaction
O(#Tiles)
Goodies III : Routing
DEMO
Corner Stitching in SwiftLightning Talk @ Base Labs
Fernando Olivero