Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
QuadTrees with OCaml
Search
Paul Chobert
October 16, 2011
Research
0
820
QuadTrees with OCaml
Paul Chobert
October 16, 2011
Tweet
Share
More Decks by Paul Chobert
See All by Paul Chobert
SCNF 311
barodeur
0
96
Stage @Novelys - été 2011
barodeur
1
120
Other Decks in Research
See All in Research
問いを起点に、社会と共鳴する知を育む場へ
matsumoto_r
PRO
0
430
Creation and environmental applications of 15-year daily inundation and vegetation maps for Siberia by integrating satellite and meteorological datasets
satai
3
130
Looking for Escorts in Sydney?
lunsophia
1
120
LLM-as-a-Judge: 文章をLLMで評価する@教育機関DXシンポ
k141303
3
830
EarthMarker: A Visual Prompting Multimodal Large Language Model for Remote Sensing
satai
3
350
SSII2025 [TS3] 医工連携における画像情報学研究
ssii
PRO
2
1.2k
Google Agent Development Kit (ADK) 入門 🚀
mickey_kubo
2
1.2k
2025年度 生成AIの使い方/接し方
hkefka385
1
720
近似動的計画入門
mickey_kubo
4
980
2025年度人工知能学会全国大会チュートリアル講演「深層基盤モデルの数理」
taiji_suzuki
24
16k
診断前の病歴テキストを対象としたLLMによるエンティティリンキング精度検証
hagino3000
1
110
Transparency to sustain open science infrastructure - Printemps Couperin
mlarrieu
1
190
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Site-Speed That Sticks
csswizardry
10
700
Raft: Consensus for Rubyists
vanstee
140
7k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Automating Front-end Workflow
addyosmani
1370
200k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Adopting Sorbet at Scale
ufuk
77
9.5k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
The World Runs on Bad Software
bkeepers
PRO
69
11k
Designing Experiences People Love
moore
142
24k
How STYLIGHT went responsive
nonsquared
100
5.6k
Transcript
QuadTrees Projet IAP1 Paul Chobert 26 novembre 2010 let presentation
=
QuadTrees • Arbres
QuadTrees • Arbres • Partition d’espaces
QuadTrees • Arbres • Partition d’espaces • Compression d’images
QuadTrees • Arbres • Partition d’espaces • Compression d’images •
Algorithme en O(ln )
Les PQuadTrees
Collections de points Comment stocker des points efficacement?
Collections de points Comment stocker des points efficacement? • Avec
des listes let points = [(0,1);(0,4);(1,1);(1,3);(3,4);(4,3)]
Collections de points Comment stocker des points efficacement? • Avec
des listes let points = [(0,1);(0,4);(1,1);(1,3);(3,4);(4,3)] • Avec des matrices false true false false true false true false true false false false false false false false false false false true false false false true false
Avec des listes Recherche de point
Avec des listes Recherche de point 1 let rec recherche
p l= 2 match l with 3 [] -> false 4 | t::q -> 5 p=t || p>t && (recherche p q);;
Avec des listes Recherche de point • Utilisation mémoire faible…
1 let rec recherche p l= 2 match l with 3 [] -> false 4 | t::q -> 5 p=t || p>t && (recherche p q);;
Avec des listes Recherche de point • Utilisation mémoire faible…
• … mais algorithme pas efficace. 1 let rec recherche p l= 2 match l with 3 [] -> false 4 | t::q -> 5 p=t || p>t && (recherche p q);;
Avec des matrices Recherche de point
Avec des matrices Recherche de point 1 let recherche (x,y)
m= 2 m.(x).(y);;
Avec des matrices Recherche de point • Recherche de point
presque instantanée… 1 let recherche (x,y) m= 2 m.(x).(y);;
Avec des matrices Recherche de point • Recherche de point
presque instantanée… • … mais utilisation mémoire catastrophique. 1 let recherche (x,y) m= 2 m.(x).(y);;
LA PUISSANCE EST DANS LES ARBRES
LA PUISSANCE EST DANS LES ARBRES
LA PUISSANCE EST DANS LES ARBRES (ln ()) & empreinte
mémoire faible
Démo
-1 1 3 5 7 9 11 1 10 100
1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 11000 12000 13000 14000 15000 20000 30000 Temps en secondes performances PQuadTree Listes
None
R Q U A D T R E E S
Codage des RQuadTrees
Codage des RQuadTrees
Codage des RQuadTrees [0;1;0;0;1;1;1;0;1;0; 1;0;1;1;0;1;1;1;0;1;0 ;1;1]
- Lecture séquentiel du codage
- Lecture séquentiel du codage 1::0::reste -> q = push
(Uni Blanc) q | 1::1::reste -> q = push (Uni Noir) q | 0::reste -> q = push (RQ(Vide,Vide,Vide,Vide)) q | [] -> q
- Lecture séquentiel du codage 1::0::reste -> q = push
(Uni Blanc) q | 1::1::reste -> q = push (Uni Noir) q | 0::reste -> q = push (RQ(Vide,Vide,Vide,Vide)) q | [] -> q =>
Conclusion ;;