Okay so this is part of an assignment I have to do, but I am confused regarding the library routine as my professor has not covered it well. So my thing is what do it do to create the library...is it just a .h file with all the functions specified below. I know this is a big question, but I am just not sure how to tackle this problem. I don't expect codes by any means just pointers to the right direction. Any help is greatly appreciated. Thanks
Use Doubly linked list to model a sparse matrix. A row is represented as a vector of doubly linked list containing non-zero entries in the row. The element in the row vector also acts as a header for the corresponding doubly linked list, and contains the information about number of non-zero elements in the row. A column is represented as a vector of doubly linked list containing non-zero entries in the column. A column-vector also acts as the header for the doubly linked list for the non-zero elements in the corresponding column. A value node is modeled as a 7-tuple of the form (left pointer, Up pointer, row, column, value, down pointer, right pointer). Left pointer points to a node in the same row previous non-zero column; right pointer points to a node in the same row next non-zero column; up pointer points to the previous row with a non-zero entry in the same column, and down-pointer points to the next row with non-zero entry in the same column. Write a library routine to implement following methods: next_column_entry, next_row_entry, prev_row_entry, prev_column_entry, row_entries(row_number), column_entries(column_number), no_of_elements_in_row(row_number), no_of_elements_column(column_number), is_empty_row(row_number), is_empty_column(column_number), get_entry(row_number, column_number), set_entry(row_number, column_number, value), is_empty_matrix().
Yeah I saw my professor and each time he confuses me more... He actually edited the first portion of my code and said I don't need to use vectors. This is what it looks like now: