|
That kind of relationship is referred to as "many-to-many" but I'm not sure what a data structure that implements it would be called. I've only ever seen this sort of thing in persistence libraries modelling the same thing in a database, but they don't tend to use a specialised structure. With one-to-one multiplicity this would be a "bidirectional map", but that's not what you've done here. Essentially you're just holding a list of graph edges with a specialised interface to it, as far as I can tell? Edit: That last one basically answered itself. I think the data structure you've made is probably pretty much a graph data structure, and you could implement your interface with an adjacency list or an adjacency matrix pretty well. The interface just looked kinda strange . Since you differentiate left and right I guess you're essentially representing a directed graph as well. zootm fucked around with this message at 10:32 on Feb 23, 2008 |
# ¿ Feb 23, 2008 10:23 |
|
|
# ¿ Apr 28, 2024 23:21 |
|
Professor Science posted:isn't tenenbaum basically a source walkthrough of minix, though? that seems kind of silly.
|
# ¿ Feb 25, 2008 10:47 |
|
csammis posted:An empty list isn't null in Java, it's just empty. size() == 0.
|
# ¿ Mar 2, 2008 10:52 |
|
Perl tends to be the standard, yeah. I see a lot of scripts written in Ruby, of all things, these days too though, and Python support is pretty ubiquitous these days so that may be a good choice. Use whichever one you like so long as you know it's available to you.
|
# ¿ Mar 10, 2008 11:44 |
|
The Commons Collections library also has a MultiMap object which does this sort of thing, but it doesn't seem to use generics. I did also find this library which refactors them to use generics though.
|
# ¿ Mar 25, 2008 20:28 |
|
MEAT TREAT posted:WTF does the ^ character mean? Is it supposed to be a better *?
|
# ¿ Apr 30, 2008 08:21 |
|
fletcher posted:You could also probably do it in javascript, but it will be painful.
|
# ¿ Jul 20, 2008 13:36 |
|
Mustach posted:That wording makes it sound like an object has a reference per member method, but I'm sure that Java implements it as one reference to a table of all member methods.
|
# ¿ Aug 24, 2008 10:10 |
|
N.Z.'s Champion posted:So unpacking tuples works in Python, but can this be done in PHP? code:
|
# ¿ Aug 26, 2008 10:59 |
|
Z-Bo posted:What is the difference between a Perl regular expression and a regular expression? I tried Googling, but the only interesting thing I found is that two regular expression matching engines can differ based upon their matching technique, backtracking or DFA (interesting but not pertinent).
|
# ¿ Oct 21, 2008 09:16 |
|
Fly posted:There have got to be older editions for sale at a quarter of that price.
|
# ¿ Jan 7, 2009 21:10 |
|
Randomosity posted:It's just a stupid stylistic thing, but I'm curious how it's done. Edit: One-liner to show it in Ruby: code:
zootm fucked around with this message at 18:25 on Jan 9, 2009 |
# ¿ Jan 9, 2009 18:21 |
|
sund posted:I do this in python by accessing the stdout stream directly and sending it '\b' characters.
|
# ¿ Jan 9, 2009 18:26 |
|
That Turkey Story posted:This is not guaranteed to be portable, so use at your own risk.
|
# ¿ Jan 10, 2009 15:22 |
|
Oh yeah, now you mention it I knew that. Hmm.
|
# ¿ Jan 10, 2009 18:29 |
|
So good I posted it twice apparently.
zootm fucked around with this message at 11:56 on Jan 14, 2009 |
# ¿ Jan 14, 2009 11:54 |
|
IntoTheNihil posted:Sorry to spam up this thread with even more questions but I've recently discovered how huge the Java market really is. Even around my city there's multiple high paying jobs for Java programmers. Can anyone tell me the pros and cons of the language and some general learning info? I messed with it a bit before and even though people say it's simple I couldn't grasp much. That said if you can deal with that and dig to find what you want (or dream of sleeping on a bed of money) it's not a terrible language to learn. Follow the tutorial as people have said, direct questions to the Java thread on here. Incidentally I do think that everyone should learn more than one language, but I think that C++ is only the best language at teaching you C++. For other concepts there's almost certainly a better choice which will teach you it in a clearer way.
|
# ¿ Jan 14, 2009 11:55 |
|
On Linux I think Video4Linux is used, which I've used before and wasn't particularly painful. Apparently GStreamer wraps it which might be a more useful abstraction though. If you feel like using Java for a cross-platform style thing, JMF supports video capture and a whole host of other nonsense. I have a vague recollection of it being one of those frameworks that takes a little work to grasp its design but being pretty easy to use beyond that. zootm fucked around with this message at 01:47 on Jan 17, 2009 |
# ¿ Jan 17, 2009 01:44 |
|
Does nesting single quotes work like that?
|
# ¿ Apr 28, 2009 17:02 |
|
tef posted:Alternatively, if there are similar pieces of software for ci that suck a lot less I'd be interested too
|
# ¿ Apr 30, 2009 15:52 |
|
Agreeing with the Python suggestion. The JDK is larger than 20MB if I recall and to use it effectively you really need an IDE, which can be in the hundreds of megs.
|
# ¿ May 1, 2009 18:36 |
|
Your label is LABLE1 (E and L wrong way around) and your jump is to LABEL1 (E and L correct way around). I have no idea what the semantics are when you tell it to jump to a label that doesn't exist so don't know if that's your problem, though.
|
# ¿ Sep 7, 2009 13:54 |
|
Anal-retentive post time.ShoulderDaemon posted:Instead of "dynamic typing", say the language has "value typing" - types are attached to individual values at runtime. quote:Terms like "dynamically typed" are arguably misnomers and should probably be replaced by "dynamically checked," but the usage is standard. ShoulderDaemon posted:Instead of "static typing", say the language has "name typing" - types are attached to names and variables at compile time. ShoulderDaemon posted:Instead of "weak typing", say the language has "implicit type conversions" - expressions of a certain type may be used as if they had a different type, and the compiler will silently convert. ShoulderDaemon" posted:Instead of "strong typing", say the language has "explicit type conversions" or "no type conversions" - types are immutable, and must be converted by the programmer's direction. I don't intend to be picky, I just don't want bad terms replaced with more rarely-used or unusual terms. Your post is an excellent description of the difficulties in classifying type systems.
|
# ¿ Jan 18, 2010 00:38 |
|
ShoulderDaemon posted:That's fair; I mostly see the terms in the works of mathematicians rather than computer scientists, describing the model checkers they've built for some logic language. For anyone working in CS I suppose sticking with the established names will avoid confusion.
|
# ¿ Jan 18, 2010 01:49 |
|
|
# ¿ Apr 28, 2024 23:21 |
|
Blogger can't do syntax highlighting out of the box but it would be relatively simple to include a reference to google-code-prettify or use GitHub's Gist embedding for code snippets.
|
# ¿ Aug 17, 2010 17:44 |