Software Design
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreSoftware Design

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 26th, 2004, 05:00 AM
Vehemence Vehemence is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 38 Vehemence User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Skyline Algorithm

Hey,

I'm sure most coders are aware of the Skyline Problem, I'm working on coding it right now, but I'm stuck (hence why would I be asking this question ). Anyway, My problem isn't scanning the numbers within the file or anything, it's producing the output numbers by judging which triples precede, overlap and then end, thus creating a new section of the skyline.

For example:


I've got image 1 (left side) triples, I'm trying to create image 2 (left side) by the data. Any ideas?

Reply With Quote
  #2  
Old March 27th, 2004, 10:20 AM
DaWei_M's Avatar
DaWei_M DaWei_M is offline
Permanently Banned
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jan 2004
Location: Central New York. Texan via Arizona, out of his element!
Posts: 7,351 DaWei_M User rank is Sergeant (500 - 2000 Reputation Level)DaWei_M User rank is Sergeant (500 - 2000 Reputation Level)DaWei_M User rank is Sergeant (500 - 2000 Reputation Level)DaWei_M User rank is Sergeant (500 - 2000 Reputation Level)DaWei_M User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 19 h 39 m 7 sec
Warnings Level: 10
Number of bans: 1
Reputation Power: 0
Its a matter of comparing adjacent triples. If the horizontal magnitude of a following triple is less than that of the preceding triple's greatest horizontal magnitude and the vertical magnitude of the leading triple is greater, the following point is obscured, i.e. disappears. There are only a small number of possibilities to compare and dispose of.

Reply With Quote
  #3  
Old October 15th, 2008, 03:09 PM
gopinath8519 gopinath8519 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 1 gopinath8519 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 55 sec
Reputation Power: 0
hi

hi
I'am a student doing my Masters In an American University

can u pls forward or post any C++ program on skyline problem
here in the forum

I could not find any sample program in the web


Thank you

Reply With Quote
  #4  
Old October 15th, 2008, 07:09 PM
Lux Perpetua Lux Perpetua is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Feb 2004
Location: San Francisco Bay
Posts: 1,475 Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level)Lux Perpetua User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 19 m 53 sec
Reputation Power: 377
I'm not sure exactly what DaWei_M was saying (we may never know ), but I'd do this with a simple sweep algorithm: imagine a vertical line sweeping over the entire plane, moving from left to right. At any given x-coordinate, it intersects the top edges of the rectangles at a finite set of heights. This data only changes at a finite number of events: when the x-coordinate of the sweep line crosses either the beginning or the end of one of the rectangles, which corresponds respectively to adding or removing a intersection with the sweep line. At the top level of the algorithm, you need to figure out what all these events are in sequence (just sort all the x-coordinates), and for processing the events, it's just a matter of finding the right data structure so that you can efficiently add and remove heights and find the top one to output.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreSoftware Design > Skyline Algorithm


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT