answersLogoWhite

0

How you can sparse can be implement in transpose?

Updated: 8/19/2019
User Avatar

Wiki User

12y ago

Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: How you can sparse can be implement in transpose?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is transpose of the sparse matrix?

Another sparse matrix.


What is a fast-transpose algorithm for sparse matrices?

A fast-transpose is a computer algorithm that quickly transposes a sparse matrix using a relatively small amount of memory. Using arrays normally to record a sparse matrix uses up a lot of memory since many of the matrix's values are zero. In addition, using the normal transpose algorithm to transpose this matrix will take O(cols*elements) amount of time. The fast-transpose algorithm only uses a little memory to record the matrix and takes only O(cols+elements) amount of time, which is efficient considering the number of elements equals cols*rows.


Transpose matrix in data structure?

DataStructure-Program to transpose a sparse matrix.#include #include #include #define MAX1 3#define MAX2 3struct sparse{int *sp ;int row ;} ;void initsparse ( struct sparse * ) ;void create_array ( struct sparse * ) ;void display ( struct sparse ) ;int count ( struct sparse ) ;void create_tuple ( struct sparse *, struct sparse ) ;void display_tuple ( struct sparse ) ;void transpose ( struct sparse *, struct sparse ) ;void display_transpose ( struct sparse ) ;void delsparse ( struct sparse * ) ;void main( ){struct sparse s[3] ;int c, i ;for ( i = 0 ; i sp = ( int * ) malloc ( MAX1 * MAX2 * sizeof ( int ) ) ;for ( i = 0 ; i < MAX1 * MAX2 ; i++ ){printf ( "Enter element no. %d:", i ) ;scanf ( "%d", &n ) ;* ( p -> sp + i ) = n ;}}/* displays the contents of the matrix */void display ( struct sparse s ){int i ;/* traverses the entire matrix */for ( i = 0 ; i < MAX1 * MAX2 ; i++ ){/* positions the cursor to the new line for every new row */if ( i % MAX2 0 )printf ( "\n" ) ;printf ( "%d\t", * ( p.sp + i ) ) ;}}/* deallocates memory */void delsparse ( struct sparse *p ){free ( p -> sp ) ;}


Program for transpose of sparse matrix?

#include &lt;stdio.h&gt; #define MAX1 3 #define MAX2 3 struct sparse { int *sp ; int row ; } ; void initsparse ( struct sparse * ) ; void create_array ( struct sparse * ) ; void display ( struct sparse ) ; int count ( struct sparse ) ; void create_tuple ( struct sparse *, struct sparse ) ; void display_tuple ( struct sparse ) ; void transpose ( struct sparse *, struct sparse ) ; void display_transpose ( struct sparse ) ; void delsparse ( struct sparse * ) ; void main( ) { struct sparse s[3] ; int c, i ; for ( i = 0 ; i &lt;= 2 ; i++ ) initsparse ( &amp;s[i] ); create_array ( &amp;s[0] ) ; printf ( "\nElements in Sparse Matrix: " ) ; display ( s[0] ) ; c = count ( s[0] ) ; printf ( "\n\nNumber of non-zero elements: %d", c ) ; create_tuple ( &amp;s[1], s[0] ) ; printf ( "\n\nArray of non-zero elements: " ) ; display_tuple ( s[1] ) ; transpose ( &amp;s[2], s[1] ) ; printf ( "\n\nTranspose of array: " ) ; display_transpose ( s[2] ) ; for ( i = 0 ; i &lt;= 2 ; i++ ) delsparse ( &amp;s[i] ); } /* initialises data members */ void initsparse ( struct sparse *p ) { p -&gt; sp = NULL ; } /* dynamically creates the matrix of size MAX1 x MAX2 */ void create_array ( struct sparse *p ) { int n, i ; p -&gt; sp = ( int * ) malloc ( MAX1 * MAX2 * sizeof ( int ) ) ; for ( i = 0 ; i &lt; MAX1 * MAX2 ; i++ ) { printf ( "Enter element no. %d:", i ) ; scanf ( "%d", &amp;n ) ; * ( p -&gt; sp + i ) = n ; } } /* displays the contents of the matrix */ void display ( struct sparse s ) { int i ; /* traverses the entire matrix */ for ( i = 0 ; i &lt; MAX1 * MAX2 ; i++ ) { /* positions the cursor to the new line for every new row */ if ( i % MAX2 0 ) printf ( "\n" ) ; printf ( "%d\t", * ( p.sp + i ) ) ; } } /* deallocates memory */ void delsparse ( struct sparse *p ) { free ( p -&gt; sp ) ; }


Is it true that the transpose of the transpose of a matrix is the original matrix?

yes, it is true that the transpose of the transpose of a matrix is the original matrix


Examples of transpose sentence?

Definition: Transpose, change, switch


Why are sparse places sparse?

why are some places sparse


When was Please Transpose EP created?

Please Transpose EP was created in 2002-08.


Sentence for sparse?

The room was sparsely furnished, with only a few pieces of basic furniture and no decorations.


What is a sentence with the word sparse?

i made a sparse contribution for a charity


When was Sparse created?

Sparse was created in 2003.


What term describes the land in Turkmenistan forest or sparse grass?

Sparse grass