![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Apr 2005
Posts: 5
Rep Power: 0
![]() |
i take java lessons at univercity and i have to complete this homework before 21th April.. I do need your help very badly.. please help me!
------------------------------------------------------------------- my homework questions>>>>>>>> 1-A sparse vector is a vector where most of the entries have 0 value. One way to store sparse vectors would be to use regular double arrays, but this would be a waste of storage since only a tiny ratio of the elements of the array will have non-zero values. Come up with an idea that reduces the space requirements of the vector and implement the following items for a new class called SparseVector * A constructor that creates a vector of n dimensions which initially will have 0 values for all the dimensions. * A put() method that will put a new non-zero value to a location in the vector * A get() method that will get the value stored in a specific location * An add() method that will add another SparseVector and return the result. You can assume that the vectors have same size. * A multiply method that will multiply the vector with a constant 2-Write a new class SparseMatrix similar to SparseVector. Your class should have similar versions of all the required methods and constructors. ------------------------------------------------------------------------ thnx very very much!!! |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Give it a go, and tell us where you get stuck. You have a few days - get on with it.
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Apr 2005
Posts: 17
Rep Power: 0
![]() |
Ooble is right..
Everyone here is more than willing to help.. but u have to give it a shot first then ask when your stuck.. that is how you learn.. plus that will not be considered cheating it will be "helping" ---- Cheers, Gigabytee |
|
|
|
|
|
#4 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
hell yeah dude, show us what you got so far!
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#5 |
|
Programmer
|
how much you wanna bet he gives up and goes to another forum?
__________________
Free Porn!! |
|
|
|
|
|
#6 |
|
Programming Guru
![]() ![]() ![]() |
We are not here to earn your diploma / degree... it does you no good, if you don't work through a solution yourself... and you hold no ground when you do not show effort on your part.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#7 |
|
Professional Programmer
|
That's a definite 1 post member
![]()
__________________
Don't take life too seriously, it's not permanent ! |
|
|
|
|
|
#8 |
|
Programming Guru
![]() ![]() ![]() |
perhaps with their newly found free time, they can actually attempt their homework.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#9 |
|
Programming Guru
![]() |
lol i like the way he spelt university wrong
![]() |
|
|
|
|
|
#10 |
|
Newbie
Join Date: Mar 2005
Posts: 17
Rep Power: 0
![]() |
You know I am taking a java class at my university, and i have never need to ask for someone to do my homework. It really just amazes me how lazy some people are.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|