A matrix is a 2-dimensional array used to store data in an organized manner. It can be implemented as a 2D array, list of lists, or through objects. A sparse matrix is a matrix with many null values. It only creates nodes for non-null elements and their headers, using less storage than a regular matrix while maintaining the structure through a more complex object-based implementation.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
25 views5 pages
Class 4: Data Structures 2S2019
A matrix is a 2-dimensional array used to store data in an organized manner. It can be implemented as a 2D array, list of lists, or through objects. A sparse matrix is a matrix with many null values. It only creates nodes for non-null elements and their headers, using less storage than a regular matrix while maintaining the structure through a more complex object-based implementation.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5
CLASS 4
Data Structures 2S2019
Matrix
In computer science a matrix is a 2-dimensional array used to store data in an
organized matter. It is usually implemented thru a 2-dimensional array, but can also be implemented thru the use of lists as a List of lists, or thru the use of objects, note that in this matrix space is not the primary goal, but rather simplicity, we will be creating as many nodes as necessary to keep an order in our matrix, even though most of them will have a value that is irrelevant to us, or is 0. Every element can be accesed thru and index or position in the Matrix. Sparse Matrix
In computer science a sparse matrix y a 2-dimensional structure consisting of rows and
column, and it’s a matrix which contains many NULL value. In comparison to a normal 2-dimensional array matrix, a sparse matrix only creates the nodes that are needed to both keep track of the elements in the matrix (headers) and the nodes itself, It’s implementation is more complex than a regular matrix, and can only be achieved thru the use of object. But the benefits are great in storage since we do not have useless nodes.