What would you like to do?
What is the difference between list and vector?
A vector holds all data items in adjacent areas of memory, making transfer of the entire vector easy and insertion or deletion of items expensive when compared with lists. Lists hold items is disjoint areas of memory, making transfer of the entire list expensive but insertion and deletion of individual items relatively cheap. Classic vectors are also fixed in size, and limited to N items, while lists can dynamically grow and shrink. Vectors also offer indexed access to the element items. Lists don't. The classic vector's predecessor is an array. Modern implementations of vectors often aim at providing similar characteristic, but the underlying data structure may in fact be a list or a hash, and those vectors typically support dynamic re-sizing.
9 people found this useful
Was this answer useful?
Thanks for the feedback!
1)Synchronization: Vector is synchronized and arraylist are not. 2)Increment size: Vector can increment the size by double,arraylist can increment it by 50%. 2)The default siz…e of vector has 10, arraylist have 0. 3)we can specify the increment size with the vector and with arraylist we can't. 4)Arraylist is very fast as it is non-synchronized.
The abstraction are the same. However, the array may be of any objects, while a vector, in narrowed definition, each element is a scalar value (e.g, int, float, double, etc), …to fulfill the abs(vector) = aScalarValue property of a vector. An array with the same data type would look exactly the same. But an array of Persons will be difficult to be a vector!
scalor: a quantity having magnitude only, and no direction; exampless are mass,temperature,and time. vector: a quantity that has both magnitude and direction ; examples are we…ight, velocity, and magnetic field strength.
List is not sync'd as a vector is.
Vectors are thread safe while ArrayLists are not ArrayLists are faster than Vectors These are 2 main differences between ArrayLists and Vectors.
Vectors and scalars are components of complex numbers. Complex numbers are z= x + iy, with one vector iy. The difference between the scalar part x and the vector part iy is, t…he square of the real part x is positive x^2 and the square of the vector part iy is negative -y^2 . This square rule is what distinguishes scalars from vectors. Complex and Real Numbers are a subset of Quaternion Numbers. thr Quaternion q=w + ix + jy + kz = qw + qv contains one scalar (qw=w) and three vectors (qv=Ix +jy + kz), . The three vectors make for a different rule for multiplication. When there is only one vector the rule for multiplication is called commutative and AB=BA. This rule is what is generally taught in mathematics and science. Howver when there is more than one vector like in real world mathematics and science AB does not equal BA. This is called Non-commutaive mathematics. Non-commutaive mathematics is the mathematics of of Quantum Physics. Quaternions provide the Unification of Relativity and Quantum Theory. Quaternions provide the correct four dimensions of Relativity Theory and the Non-Commutativity of Quantum Theory. The general rule for multiplication of quaternions AB= (AwBw -Av.Bv) + (AwBv + AvBw + AvxBv) If the vectos Av and Bv are parallel AvxBv is zero and multiplication is commutative. If there is only one vector i like in complex numbers then AvXBv is always parallel ixi=0. If the vectors Av and Bv are not parallel then multiplication is non-commutitive. Guess what most of the time things are not parallel in math and physics. Scalars and vectors are very different and make up the two parts of numbers in math and science. Quaternions are the only kinds of numbers that can provide unique ( associative (AB)C = A(BC) ) division, such that you can solve equations like Ax=B. Quaternion multiplication is all around us. Riding a bycycle uses quaternion math just like a gyroscope. Rotations in space requires quaternion multiplication. It is important to distinguish between scalars and vectors and time to learn quaternion mathematics and understand the real world..
A vector is a quantity with both magnitude (strength) and direction. Like a force having a strength in pounds and a direction. Or a wind having magnitude (in mph) and di…rection (Northeast). A scalar has only magnitude. Like the length of a segment or amount of peanuts in a jar. Scalars are just numbers.
Vectors are thread safe but array lists are not. Hence array lists are faster than Vectors.
A vector carries the disease but doesn't show any symptoms.
The diference between a vector and a carrier when involving disease, it that a vector is an organism that spreads disease but shows no symptoms while a carrier is a human that… spreads disease without showing any symptoms.
Main difference is that you can enlarge vector graphics without lose of quality. Vector graphics can be scaled and changed at any time without any lose of quality or appearanc…e while raster images can lose sharpness and quality when you scale or change them.
A quantity is a vector if its direction makes a difference, like force and speed. A quantity is a scalar if its direction doesn't make any difference, like temperature and p…rice. Answer2: The difference between a vector and a scalar is the angle. Numbers in Physics are scalars and vectors. Both scalars and vectors are parts of a quaternion. Quaternions consist of a scalar and a three vectors, Q = w + Ix + Jy + Kz = |Q|(cos(Q) + v Sin(Q)) . Real and complex numbers are subsets of quaternions. The difference between a vector and a scalar is the angle of Q. If he angle is a even multiple of 90 degrees, the quaternion is a scalar; positive scalars are multiples of 4 and negative scalars are multiples of 2. If the angle is an odd multiple of 90 degrees, the quaternion is a vector. If the angle is not a multiple of 90 degrees, the number is both a scalar and a vector. It is likely that most quantities in physics are quaternions with both scalar and vector parts.
A raster is an image that is defined by a map of pixels, such as aphotograph or .jpg file. Rasters are easy to edit but difficult toscale, due to them becoming blurry or pixel…lated when scaled tolarge sizes. Raster images are preferred by photographers anddigital artists who are more concerned about realistic quality andease of publication than scalability. An example of a program thatuses rasters is Adobe Photoshop. A vector image is defined by geometrical variables such as lines,curves, points and polygons. Because vectors rely on mathematicalequations to map out where the design is, they are perfectlyscalable and do not lose quality at large sizes. Vector images arepreferred by graphic designers who plan to use illustrations andlogos on media of different sizes, such as business cards, letterheads, posters and banners. Programs that uses vectors includeAdobe Illustrator and Super Vectorizer (svgvector.com/download/Super-Vectorizer-2.dmg ).
A vector is two sets of points. One is a start point, and the other is an end point, thus giving the vector two crucial qualities: magnitude, or length, and direction. A scala…r is simply a regular number, like 5 or 20.7.
In Animal Life
A vector is an organism that carries a pathogen with it. An example would be malaria-carrying mosquitos. Pests are in themselves the problem and usually refer to insects or an…imals that destroy crops
They are both standard library template classes that can be used as data containers. A vector is essentially an array template that allows constant time access to any element …in the vector and can expand dynamically and more efficiently than a C-style array. There is no need to keep track of the size of the array as the length is encapsulated within the vector, thus passing vectors into functions is much easier and much safer than passing arrays. The template's methods and operators also provide a rich set of functions that make them easier to work with. A list is essentially a doubly-linked list template that allows constant time access to the head or tail of the list, and includes all the functionality you would expect of a list, including sorting and traversal.
Raster images are defined in pixels. ie At every x,y location, whether it is black or white. Vector images are defined by lines. eg From x,y to X,Y. Any pixel that lies betw…een these points on a white background becomes black. It is easier to convert Vector images to Raster images, rather than the other way. Vector images are sometimes smaller (in data size). eg If the image contains one line, then the amount of data needed to store this is smaller than having to define every pixel in the image regardless of whether it is relevant. Vector images can be scaled smaller and larger without any significant loss of detail. Raster images that have been made smaller lose clarity and cannot then be made larger to improve the quality.