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
NLP Colloquium
junokim
1
160
言語モデルによるAI創薬の進展 / Advancements in AI-Driven Drug Discovery Using Language Models
tsurubee
2
370
引力・斥力を制御可能なランダム部分集合の確率分布
wasyro
0
160
Mathematics in the Age of AI and the 4 Generation University
hachama
0
160
Large Language Model Agent: A Survey on Methodology, Applications and Challenges
shunk031
12
8.2k
【緊急警告】日本の未来設計図 ~沈没か、再生か。国民と断行するラストチャンス~
yuutakasan
0
130
Agentic AIとMCPを利用したサービス作成入門
mickey_kubo
0
260
20250605_新交通システム推進議連_熊本都市圏「車1割削減、渋滞半減、公共交通2倍」から考える地方都市交通政策
trafficbrain
0
440
線形判別分析のPU学習による朝日歌壇短歌の分析
masakat0
0
130
時系列データに対する解釈可能な 決定木クラスタリング
mickey_kubo
2
710
ストレス計測方法の確立に向けたマルチモーダルデータの活用
yurikomium
0
600
ノンパラメトリック分布表現を用いた位置尤度場周辺化によるRTK-GNSSの整数アンビギュイティ推定
aoki_nosse
0
320
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
How to Ace a Technical Interview
jacobian
277
23k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Six Lessons from altMBA
skipperchong
28
3.9k
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 ;;