Skip to Content
アルゴリズムクイックリファレンス 第2版
book

アルゴリズムクイックリファレンス 第2版

by George T. Heineman, Gary Pollice, Stanley Selkow, 黒川 利明, 黒川 洋
December 2016
Intermediate to advanced
440 pages
9h 44m
Japanese
O'Reilly Japan, Inc.
Content preview from アルゴリズムクイックリファレンス 第2版
9.5
 線分走査法
295
者は隣り合わねばならない。実際、
線分走査法
は、この線分の状態を管理して、効
率的に交点を見つける。
図9-7で示した
9
つの水平走査線の位置をよく見ると、これらが
(i)
線分の始点ま
たは終点、あるいは
(ii)
交点の場所で選ばれていることがわかるだろう。
線分走査
は、実際にデカルト平面上を「走査」するのではない。ただ、イベントキューに
2*n
個の線分端点を挿入するだけである。このイベントキューは、優先度付きキュー
に修正を加えたものだ。線分の始終点を含めたすべての存在する交点が、これらの
キューに入った点の処理によって検出できる。
線分走査法
は、このキューを処理す
ることで、走査線
L
の状態を構築し、隣り合う線分がいつ交差するか決定する。
9.5.1
 入出力
線分走査法
は、デカルト平面上の
n
個の線分の集合
S
を処理する。
S
には重複した
線分は存在しない。どの線分も共線(すなわち、同じ角度で互いに重なる)にはな
い。
アルゴリズムは、水平および垂直の線分を扱えるが、線分の順序付けと計算には注
意を要する。どの線分も一点に縮退する(すなわち、線分の始点と終点が同じにな
る)ことはない。
出力は、線分間の交点(存在する場合)を表す
k
個の点の集合、およびその各点
p
i
について、交点を形成する線分となる。
9.5.2
 文脈
交点の期待個数が、線分の個数に比べて大幅に少ない場合には、
線分走査法
は力
任せの方式に比べて、優れた性能を示す。交点の個数が多い場合には、保守処理の
手間がかかり便益を打ち消してし ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

scikit-learn、Keras、TensorFlowによる実践機械学習 第2版

scikit-learn、Keras、TensorFlowによる実践機械学習 第2版

Aurélien Géron, 下田 倫大, 長尾 高弘
Rクイックリファレンス 第2版

Rクイックリファレンス 第2版

Joseph Adler, 大橋 真也, 木下 哲也
プログラミングRust 第2版

プログラミングRust 第2版

Jim Blandy, Jason Orendorff, Leonora F. S. Tindall, 中田 秀基
Rではじめるデータサイエンス

Rではじめるデータサイエンス

Hadley Wickham, Garrett Grolemund, 黒川 利明, 大橋 真也

Publisher Resources

ISBN: 9784873117850Other