Flash Website Builder- Trendy Site Builder is a Flash Site Building tool that helps users build stunning websites. Check Out Custom Custom Logo Design by LogoBee. Website Design and Free Logo Templates available.
 CodingForums.com complex grouping from array data

Before you post, read our: Rules & Posting Guidelines

Enjoy an ad free experience by logging in. Not a member yet? Register.
 01-20-2009, 06:01 AM PM User | #1 rheziel New to the CF scene   Join Date: Jan 2009 Posts: 1 Thanks: 0 Thanked 0 Times in 0 Posts complex grouping from array data I've been hitting the wall for the last 4 days on this one, and would appreciate any ideas that anyone may have regarding it. Here's the overview: Imagine a puzzle, where groups of pieces should theoretically be able to be snapped together outside of the final resting place. To make it simple to understand lets just say that it is a 5 x 5 grid labeled A - Y like this: a b c d e f g h i j k l m n o p q r s t u v w x y a should be able to snap to b and f but no others b should be able to snap to a,c,and g but no others ...etc. OK now I have all the things worked out that I thought would be difficult, when a piece is layed down, it checks to see if that piece is in the correct place relative to the other pieces on the board, and i have it creating an array of all pieces that are in the correct spot, as well as a large multi demensional array containing all of the possible joins for each of the pieces (a connects to b or f, etc) The problem lies when more than 2 clusters are correct on the board. For an example, lets say that pieces a,b,c,u,v,w are all in the correct spot relative to each other, and an array is returned with these pieces. I now need to loop through them all and determine that a,b,c belong together and u,v,w belong together. (and ideally create an array for each letter saying all pieces that should be joined to it.. example : cluster[a] = b,c cluster[b] = a,c Here's he basic code I have been working with: Code: ```//clus= all pieces that are candidates to be clustered together for(i=0;i

 Bookmarks

 Thread Tools Rate This Thread Rate This Thread: 5 : Excellent 4 : Good 3 : Average 2 : Bad 1 : Terrible

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home :: Client side development     JavaScript programming         DOM and JSON scripting         Ajax and Design         JavaScript frameworks         Post a JavaScript     HTML & CSS     XML     Flash & ActionScript         Adobe Flex     Graphics and Multimedia discussions     General web building         Site reviews         Building for mobile devices :: Server side development     Apache configuration     Perl/ CGI     PHP         Post a PHP snippet     MySQL         Other Databases     Ruby & Ruby On Rails     ASP     ASP.NET     Java and JSP     Other server side languages/ issues         ColdFusion         Python :: Computing & Sciences     Computer Programming     Computer/PC discussions     Geek News and Humour Web Projects and Services Marketplace     Web Projects         Small projects (quick fixes and changes)         Medium projects (new script, new features, etc)         Large Projects (new web application, complex features etc)         Unknown sized projects (request quote)         Vacant job positions         Looking for work/ for hire         Project collaboration/ partnership         Paid work offers and requests (Now CLOSED)     Career, job, and business ideas or advice     Domains, Sites, and Designs for sale         Domains for sale         Websites for sale         Design templates and graphics for sale :: Other forums     Member Offers     Forum feedback and announcements

All times are GMT +1. The time now is 08:54 PM.