shintetsu_80's Profile
Reputation: 31
Craftsman
- Group:
- Active Members
- Active Posts:
- 105 (0.06 per day)
- Joined:
- 01-July 08
- Profile Views:
- 3,110
- Last Active:
May 07 2013 11:38 AM- Currently:
- Offline
Previous Fields
- Country:
- US
- OS Preference:
- Mac
- Favorite Browser:
- Chrome
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- PC
- Your Car:
- Nissan
- Dream Kudos:
- 0
Latest Visitors
-
ButchDean 
15 Nov 2012 - 20:14 -
ssharma286 
02 Jan 2012 - 17:48 -
Aphex19 
11 Jul 2011 - 17:29 -
darek9576 
24 Apr 2011 - 15:57 -
Craig328 
22 Apr 2011 - 06:30
Posts I've Made
-
In Topic: looping algorithm suckyness
Posted 18 Mar 2013
cfoley I wholly agree with you and in fact my implementation is similar to your encapsulation idea. O(n^2) is probably not going to be an issue in my case. I was really just curious if someone smarter than me might have a solution that I wasn't seeing. Thanks for you input. -
In Topic: looping algorithm suckyness
Posted 17 Mar 2013
Starbucks internet connection sucks! Removing a double post cuz I don't know how to just delete. -
In Topic: looping algorithm suckyness
Posted 17 Mar 2013
cfoley, on 16 March 2013 - 10:59 PM, said:Encapsulate the problem in a class. Then you don't have to care if the class materialises the view or scans your arrays every time it is queried. I'm not entirely clear on how your association array works but something suitable can probably be adapted from the following:
public class Relation<A, B> { public Relateion(A[] as, B[] bs, Object[] associations) { // TODO Auto-generated constructor stub } public List<A> associatedAs(B B)/>/>/> { // TODO Implement return null; } public List<B> associatedBs(A a) { // TODO Implement return null; } }
cfoley I don't understand how this solves the looping issue. I'm reading your answer to imply creating a utility class that builds the two association arrays that are needed via the Relateion method. So the Relateion method would still do the exact same looping algorithm, but you get the accessor methods associatedAs and associatedBs. Maybe I wasn't clear in the initial post, or I misunderstand you're solution. Creating a wrapper or utility object to hold the finished products is really a non-issue. I only interested in trying to find a better solution to the initial looping algorithm.
To be fair these are completely disparate objects so there just might not be a better solution. -
In Topic: looping algorithm suckyness
Posted 17 Mar 2013
stackoverflow you're correct that this would at least limit doing this multiple times; however, in this case it's going to be used as a utility function where the cache would not reflect updates unless it was refreshed. The api in this case doesn't support page queries. So it's an all or nothing query. Meaning I couldn't just query for the updates an merge them in. -
In Topic: Naughty Nokia
Posted 11 Jan 2013
When I first read the topic heading I was expecting to see some dirty pics of Nokia phones. Is that weird?
My Information
- Member Title:
- D.I.C Head
- Age:
- 33 years old
- Birthday:
- January 4, 1980
- Gender:
-
- Location:
- Austin, TX
- Interests:
-
Working out
Programming
Gaming - Full Name:
- Ralph Smith
- Years Programming:
- 5
- Programming Languages:
- C/C++, python, Objective-C, java, C#
Contact Information
- E-mail:
- Private
- Website URL:
-
http://ralphunlimited.com
Friends
shintetsu_80 hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
shintetsu_80 has no profile comments yet. Why not say hello?