Search found 491 matches

by scwizard
Wed Feb 25, 2009 5:15 am UTC
Forum: Computer Science
Topic: Better than both a linked list and a deque!
Replies: 64
Views: 5375

Re: Better than both a linked list and a deque!

A more complete implementation.

#define nullptr 0
#define EVER ;;
#define INHERITS_FROM :

Right now it's unsafe, but if you want to make it safe and throw exceptions and such, all you need to do is make its iterator checked. All the potentially unsafe functions go through the iterator.
by scwizard
Sun Feb 22, 2009 8:46 pm UTC
Forum: Computer Science
Topic: Is there a fast way to find each elem thats in all of n sets
Replies: 19
Views: 2187

Re: Is there a fast way to find each elem thats in all of n sets

demon wrote:Well, O(mn) is the data size, so there should be no possible way you could go lower than that.

Well I was thinking there was a way to not look at all the elements. For example if "A" is not in set #1, then you don't need to look for "A" in any of the other sets.
by scwizard
Sat Feb 21, 2009 6:07 am UTC
Forum: Computer Science
Topic: Is there a fast way to find each elem thats in all of n sets
Replies: 19
Views: 2187

Is there a fast way to find each elem thats in all of n sets

Is there any sort of fast algorithm to do the following?
You have n sets containing up to m items each.

Find each element that is in all of n sets.
by scwizard
Fri Feb 20, 2009 9:23 pm UTC
Forum: Computer Science
Topic: Better than both a linked list and a deque!
Replies: 64
Views: 5375

Re: Better than both a linked list and a deque!

Skip lists are not sequence containers. Skips lists are sorted containers with key based access.

A shrub is a unsorted sequence container with index based access.
by scwizard
Fri Feb 20, 2009 7:38 pm UTC
Forum: Computer Science
Topic: Software Transactional Memory
Replies: 11
Views: 2108

Re: Software Transactional Memory

Seems like it. It requires the program to pretty much be aware of itself, in the same manner as garbage collection.

As for implementing this, just keep track of memory accesses, in the same way you'd keep track of references.
by scwizard
Fri Feb 20, 2009 6:18 pm UTC
Forum: Computer Science
Topic: Better than both a linked list and a deque!
Replies: 64
Views: 5375

Re: Better than both a linked list and a deque!

I don't know much about jump lists. What is the point of them anyway? What are they good at?
by scwizard
Fri Feb 20, 2009 6:16 pm UTC
Forum: Computer Science
Topic: Computer Science Colleges - A Mega-Merg'd Thread
Replies: 52
Views: 5793

Re: A Computer Science College

The term "undergrad research" puzzles me. I mean I guess it would be theoretically possible, but I don't see how I would go about doing it. I mean, what kind of research can an undergrad do? Especially one at a college with low standards of admission like Stonybrook (meaning that the stude...
by scwizard
Fri Feb 20, 2009 4:23 pm UTC
Forum: Computer Science
Topic: Better than both a linked list and a deque!
Replies: 64
Views: 5375

Re: Better than both a linked list and a deque!

I'm pretty sure that skip lists work using key value pairs (like a traditional binary search tree) instead of being accessed by index.
by scwizard
Fri Feb 20, 2009 4:16 pm UTC
Forum: Computer Science
Topic: Better than both a linked list and a deque!
Replies: 64
Views: 5375

Re: Better than both a linked list and a deque!

No, the entire data structure takes up (2n-1)*sizeof(wood) + sizeof(Shrub). Size of data structure is (n + (2n-1)) for fully populated tree. Well all shrubs are "fully populated" meaning each parent has two children. The size of a shrub in this implementation is exactly: 56n - 25 bytes fo...
by scwizard
Fri Feb 20, 2009 4:09 pm UTC
Forum: Computer Science
Topic: Computer Science Colleges - A Mega-Merg'd Thread
Replies: 52
Views: 5793

Re: A Computer Science College

It depends on what you're looking for in a college, is it a degree that will get you a job as a programmer, or knowledge of computer science? My school, Stony Brook University (which is a relatively easy college to get into by the way), can't seem to decide which kind of thing it wants to do. It has...
by scwizard
Fri Feb 20, 2009 3:40 pm UTC
Forum: Computer Science
Topic: Better than both a linked list and a deque!
Replies: 64
Views: 5375

Re: Better than both a linked list and a deque!

You were saying the same thing as him? It sounded like you were saying something different and wrong, while he was saying something correct and that I was already aware of. Anyways the correct title of this topic is "Better than both a linked list and a deque at inserting and deleting elements ...
by scwizard
Fri Feb 20, 2009 3:09 pm UTC
Forum: Computer Science
Topic: Better than both a linked list and a deque!
Replies: 64
Views: 5375

Re: Better than both a linked list and a deque!

scwizard's sample implementation doesn't seem to have an iterate function The nodes at the bottom are stored in the fashion of a linked list. If you have a Leaf named CurrentLeaf, then the next leaf is stored in CurrentLeaf->Right.Leaf and the previous leaf is stored in CurrentLeaf->Prev.Leaf. No n...
by scwizard
Fri Feb 20, 2009 4:57 am UTC
Forum: Computer Science
Topic: Better than both a linked list and a deque!
Replies: 64
Views: 5375

Re: Better than both a linked list and a deque!

Shriike wrote:I'm sorry, maybe it's just me but I fail to see how this would be more useful then a deque or a linked list.

Pushing onto either side of a deque (or popping off) should be O(1) if I'm not mistaken. Accessing a point in the middle should be impossible.

You sound very confused here...
by scwizard
Fri Feb 20, 2009 2:21 am UTC
Forum: Computer Science
Topic: Better than both a linked list and a deque!
Replies: 64
Views: 5375

Re: Better than both a linked list and a deque!

O(1) per iteration. If you perform n iterations (iterating over the entire structure) then you have O(1) * n = O(n). What I'm saying is that the leaves are linked at the bottom in the fashion of a linked list, so you don't need to start at the top of the tree to get the next element. Anyways, I've a...
by scwizard
Thu Feb 19, 2009 11:10 pm UTC
Forum: Computer Science
Topic: Better than both a linked list and a deque!
Replies: 64
Views: 5375

Better than both a linked list and a deque!

I've discovered that if you take a (self balancing) tree, put the data on its leaves and then make the forks keep track of how many leaves are below to each side of them, then you get a sequence container with the following efficiencies: Get data by index: O(log n) Insert data by index: O(log n) Del...
by scwizard
Fri Feb 06, 2009 3:29 pm UTC
Forum: Mathematics
Topic: How does the cartesian product relate to other products?
Replies: 30
Views: 3025

Re: How does the cartesian product relate to other products?

That doesn't make any sense. That would mean that you could evaluate a matrix to a single real number. No, you could, given a matrix and two natural numbers between 0 and n-1 (the column number and the row number), get an associated real number (the entry of the matrix at that column and row). Oh I...
by scwizard
Fri Feb 06, 2009 6:14 am UTC
Forum: Mathematics
Topic: How does the cartesian product relate to other products?
Replies: 30
Views: 3025

Re: How does the cartesian product relate to other products?

I still don't get it, a matrix is a set of functions?
by scwizard
Fri Feb 06, 2009 5:47 am UTC
Forum: Mathematics
Topic: How does the cartesian product relate to other products?
Replies: 30
Views: 3025

Re: How does the cartesian product relate to other products?

antonfire wrote:Finally, an n by n matrix with real coefficients is a function [imath]f:n \times n \rightarrow \mathbb{R}[/imath].

I don't get this. A matrix is a function with a codomain consisting of a single real number?

That doesn't make any sense. That would mean that you could evaluate a matrix to a single real number.
by scwizard
Fri Feb 06, 2009 5:00 am UTC
Forum: Mathematics
Topic: How does the cartesian product relate to other products?
Replies: 30
Views: 3025

Re: How does the cartesian product relate to other products?

Interesting.

I thought that multiplication might follow directly from the cartesian product for other things, because that's the case for natural numbers (in a way sort of), but apparently multiplication is just a name for a function with a series of properties.
by scwizard
Fri Feb 06, 2009 3:15 am UTC
Forum: Mathematics
Topic: How does the cartesian product relate to other products?
Replies: 30
Views: 3025

Re: How does the cartesian product relate to other products?

Now something is called a multiplication in basically two different cases. First, it is used as a generic group operation when you don't know if the group commutes. But it is more strongly used when you have a group operation that distributes over another group operation -- ie, you have a group ope...
by scwizard
Fri Feb 06, 2009 1:34 am UTC
Forum: Mathematics
Topic: How does the cartesian product relate to other products?
Replies: 30
Views: 3025

Re: How does the cartesian product relate to other products?

An ordered pair is (a,b)=\{a, \{a,b\}\} The cartesian product of two sets S\times T is the set of ordered pairs \{ (s,t) \mid s\in S, t\in T\} . A function f:S \rightarrow T is a subset of S\times T such that if (x,y)\in f and (x,y')\in f , then y=y' . The se...
by scwizard
Thu Feb 05, 2009 10:54 pm UTC
Forum: Mathematics
Topic: How does the cartesian product relate to other products?
Replies: 30
Views: 3025

Re: How does the cartesian product relate to other products?

Hmm, this sounds very interesting.

Now the other question I have, which I thought the OP implied, but it turns out it didn't really, is how are matrices defined in terms of sets?
by scwizard
Thu Feb 05, 2009 8:36 pm UTC
Forum: Mathematics
Topic: How does the cartesian product relate to other products?
Replies: 30
Views: 3025

How does the cartesian product relate to other products?

So I'm a computer science undergrad and am currently learning about matrix multiplication in my introduction of linear algebra course. Now I was supprised to learn that the multiplication of matrices was not commutative. It made me think that perhaps commutativity was not a fundemental aspect of mul...
by scwizard
Thu Feb 05, 2009 6:38 am UTC
Forum: News & Articles
Topic: GOP Bailout "Pork" List
Replies: 170
Views: 11387

Re: GOP Bailout "Pork" List

Do not fall into this mindset. We have seen time and again that screwing with ecosystems comes back to bite us in the arse. Even something as "useless" seeming as a desert can prove to be vital. Every time we harm an ecosystem, we suffer for it. Rain forests, oceans, grassland, swamps, et...
by scwizard
Thu Feb 05, 2009 6:35 am UTC
Forum: News & Articles
Topic: Obama to Limit CEO Pay to $500K
Replies: 68
Views: 6745

Re: Obama to Limit CEO Pay to $500K

Rush Limbaugh agrees with this. He says "once you accept your failout the government owns you, haha sucker" I'm not defending it. I want to give you something more chilling to consider. I realize that the federal government now has the power to tell any of these peons, these idiots that we...
by scwizard
Thu Feb 05, 2009 6:19 am UTC
Forum: Serious Business
Topic: Capitalism and Poverty
Replies: 112
Views: 9554

Re: Capitalism and Poverty

I think a free market inevitably leads to competition.
And of course this is a good thing. Everyone runs faster when it's a race.
by scwizard
Thu Feb 05, 2009 5:40 am UTC
Forum: Serious Business
Topic: What constitutes sexual consent?
Replies: 177
Views: 14829

Re: What constitutes sexual consent?

Well the pragmatic point of view is that this is as close to perfect as they can get. Showing that a sibling relationship doesn't have much of a power difference is completely impossible in court (besides from being untrue the vast majority of the time).
by scwizard
Thu Feb 05, 2009 5:19 am UTC
Forum: Serious Business
Topic: What constitutes sexual consent?
Replies: 177
Views: 14829

Re: What constitutes sexual consent?

My statement was a conditional, not a biconditional. The lack of a power imbalance does not imply consensuality. You said that a "power differential" can exist between siblings. You said that a sibling can pressure a fellow sibling into unwanted sex. So, the questions is, if there's no po...
by scwizard
Thu Feb 05, 2009 5:07 am UTC
Forum: Serious Business
Topic: What constitutes sexual consent?
Replies: 177
Views: 14829

Re:

age of consent actually varies from (maybe 14) definitely 16 to 18 See the below chart for details ---- http://www.avert.org/aofconsent.htm Yes, but that second in my post was about the united states. Clarification is probably good though. Seems like things are off to a good start. Re: sibling sibl...
by scwizard
Thu Feb 05, 2009 3:42 am UTC
Forum: News & Articles
Topic: Obama authorizes CIA "renditions"
Replies: 59
Views: 5103

Re: Obama authorizes CIA "renditions"

Uh, of course it's transitory. They only snatch them for a little bit, before they hand them over to "allies" with no scruples in the Middle East or elsewhere, who then torture them and feed any intel back to the CIA. That's the point of the system. That doesn't make it any better. (e) Mi...
by scwizard
Thu Feb 05, 2009 3:36 am UTC
Forum: Serious Business
Topic: Capitalism and Poverty
Replies: 112
Views: 9554

Re: Capitalism and Poverty

I see, thanks for the clarification.

That's why it's good to mix capitalism and socialism. Because that way the best can get rewarded for their efforts, and the losers can still have a roof over their heads.
by scwizard
Thu Feb 05, 2009 3:24 am UTC
Forum: News & Articles
Topic: Obama authorizes CIA "renditions"
Replies: 59
Views: 5103

Re: Obama authorizes CIA "renditions"

Actually if you read the actual executive order it's pretty cool: 4(a) CIA Detention. The CIA shall close as expeditiously as possible any detention facilities that it currently operates and shall not operate any such detention facility in the future. 2(g) The terms "detention facilities" ...
by scwizard
Thu Feb 05, 2009 3:18 am UTC
Forum: News & Articles
Topic: Obama authorizes CIA "renditions"
Replies: 59
Views: 5103

Re: Obama authorizes CIA "renditions"

But but... It was change that we could believe in... I wanted to believe ;_; Well let me look at the executive order, maybe it's not really that... HOLY FUCK HE REMOVED THE EXECUTIVE ORDERS SECTION FROM HIS SITE. WHAT A FUCKING DICK. WHATEVER HAPPENED TO A NEW ERA OF TRANSPARENCY ASSHOLE! Ok so it's...
by scwizard
Thu Feb 05, 2009 3:11 am UTC
Forum: News & Articles
Topic: Obama authorizes CIA "renditions"
Replies: 59
Views: 5103

Re: Obama authorizes CIA "renditions"

http://www.latimes.com/news/nationworld ... 1244.story

Ok, honeymoon is over. What the fuck guy seriously.

Damn and I fucking voted for this guy...
by scwizard
Thu Feb 05, 2009 3:03 am UTC
Forum: Serious Business
Topic: Capitalism and Poverty
Replies: 112
Views: 9554

Re: Capitalism and Poverty

Timequake wrote:Capitalism, like the mercantilism from which it was born, is a zero-sum game.

I strongly disagree here. If capitalism was a zero sum game, then we'd still be at the same standard of living we were at thousands of years ago.
by scwizard
Thu Feb 05, 2009 2:59 am UTC
Forum: Serious Business
Topic: What constitutes sexual consent?
Replies: 177
Views: 14829

What constitutes sexual consent?

Pre-emptive trigger warning for this thread, in case you weren't able to glean that from the title. ~CM What constitutes consenting to sex is not nearly as clear cut as many males would like to believe. I've seen people on the fora shocked when they hear that legally in the United States, a person ...
by scwizard
Thu Feb 05, 2009 2:15 am UTC
Forum: Serious Business
Topic: Paedophile comes out on DeviantArt
Replies: 462
Views: 51098

Re: Paedophile comes out on DeviantArt

To take your example, if a rich person says to a poor person, "I'll take you back to my mansion for the night if you agree to suck me off." I'd say that isn't consensual sex, any more than a CEO offering to hire a secretary if she'll sleep with him is consensual sex. By this logic prostitu...
by scwizard
Thu Feb 05, 2009 2:06 am UTC
Forum: News & Articles
Topic: Woman Pops Out 8 Kids In One Sitting In California
Replies: 82
Views: 6605

Re: Woman Pops Out 8 Kids In One Sitting In California

Izawwlgood wrote:So, to reiterate: There is no correlation to parents intelligence and childrens intelligence.

I disagree. I believe that genetics are partially responsible for intellectual ability, and that there is a correlation between parents genetics and the genetics of their children.
by scwizard
Thu Feb 05, 2009 2:03 am UTC
Forum: News & Articles
Topic: Obama to Limit CEO Pay to $500K
Replies: 68
Views: 6745

Re: Obama to Limit CEO Pay to $500K

How else do you propose that we stop CEOs from running off with public money?
by scwizard
Thu Feb 05, 2009 2:00 am UTC
Forum: News & Articles
Topic: Photography = terrorism
Replies: 72
Views: 5614

Re: Photography = terrorism

For a long time police have harassed photographers of all sorts. Especially ones taking photographs for police misconduct. This legitimizes it, expect to see photographer harassment of deviants of all sorts become more common. This also means they're allowed to take your cellphone away from you if y...

Go to advanced search