| | |
vector (1xm array) comparisons
Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
![]() |
•
•
Join Date: Sep 2007
Posts: 12
Reputation:
Solved Threads: 0
In linear algebra a 1 by m array of (let's say integers) can be considered a vector (row or column). Given 2 row vectors of the same size, can they be compared using <,> ? If so, what relation between individual elements in the arrays is required for "less than" to be true?
Is vector {2,3,3} < vector {2,3,4}...
...or does every element have to be less (i.e. {1,2,3} < {2,3,4} but not so for {2,3,3})
Is vector {2,3,3} < vector {2,3,4}...
...or does every element have to be less (i.e. {1,2,3} < {2,3,4} but not so for {2,3,3})
•
•
Join Date: Sep 2007
Posts: 12
Reputation:
Solved Threads: 0
•
•
•
•
Does your linear algebra text book describe a "less than" operation?
If so, then it would be perfectly possible to write some code to do the same thing.
Now whether std::vector implements that or not is for you to research, or maybe you can implement your own vector class.
There are no standard mathematical definitions for the comparison of vectors. You could compare properties of vectors -- by 'property' I mean functions that take vectors and produce real numbers. You could compare vectors' lengths, their first coordinates, etc.
The thing is, as long as you're measuring a property represented by a continuous function, you're going to have vectors that compare equally (for example, if their lengths are equal). There are also some comparison functions that don't correspond to any 'property' that can be measured by real numbers. Lexicographical ordering would be one of these.
The thing is, as long as you're measuring a property represented by a continuous function, you're going to have vectors that compare equally (for example, if their lengths are equal). There are also some comparison functions that don't correspond to any 'property' that can be measured by real numbers. Lexicographical ordering would be one of these.
![]() |
Other Threads in the Computer Science Forum
- Previous Thread: Final Year Project Report
- Next Thread: WebKit and cygwin help!
| Thread Tools | Search this Thread |
ai algorithm algorithms amazon assignment assignmenthelp assignments automata battery bigbrother binary bittorrent bizarre bletchleypark blogging bomb business cern codebreaker compiler computer computers computerscience computertrackingsoftware conversion csc data dataanalysis dataintepretation development dfa dissertation dissertations dissertationthesis dissertationtopic ebook employment energy extensions floatingpoint foreclosuresoftware fuel gadgets geeks givemetehcodez government graphics hardware history homeowners homeworkassignment homeworkhelp humor ibm idea ideas internet iphone ipod itcontracts jobs kindle laser laws lsmeans mainframes marketing mining mobileapplication msaccess netbeans networking news os p2p piracy piratebay programming research sas science security sex simulation software spying sql study supercomputer supercomputing sweden technology textfield turing turingtest two'scompliment uk virus warehouse ww2






