mirror of
https://github.com/xfarrow/lasd.git
synced 2025-06-05 21:49:14 +02:00
Library 5
fixed compile issues
This commit is contained in:
11
librerie/exercise5/matrix/csr/matrixcsr.hpp
Normal file → Executable file
11
librerie/exercise5/matrix/csr/matrixcsr.hpp
Normal file → Executable file
@@ -12,7 +12,7 @@
|
||||
namespace lasd {
|
||||
|
||||
template <typename Data>
|
||||
class MatrixCSR : virtual public List<Data>,
|
||||
class MatrixCSR : virtual public List<std::pair<Data,ulong>>,
|
||||
virtual public Matrix<Data>{ // Must extend Matrix<Data>
|
||||
|
||||
protected:
|
||||
@@ -20,11 +20,10 @@ protected:
|
||||
using Matrix<Data>::rows;
|
||||
using Matrix<Data>::columns;
|
||||
using List<std::pair<Data,ulong>>::size;
|
||||
|
||||
Vector<struct List<std::pair<Data,ulong>>::Node**> R(1);
|
||||
Vector<struct List<std::pair<Data,ulong>>::Node**> R;
|
||||
|
||||
using List<std::pair<Data,ulong>>::head;
|
||||
using struct List<std::pair<Data,ulong>>::Node;
|
||||
using typename List<std::pair<Data,ulong>>::Node;
|
||||
|
||||
/*
|
||||
Node
|
||||
@@ -42,7 +41,7 @@ public:
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Specific constructors
|
||||
MatrixCSR(const ulong&, const ulong&); // A matrix of some specified dimension
|
||||
MatrixCSR(const ulong, const ulong); // A matrix of some specified dimension
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
@@ -78,7 +77,7 @@ public:
|
||||
void RowResize(const ulong&) override; // Override Matrix member
|
||||
void ColumnResize(const ulong&) override; // Override Matrix member
|
||||
|
||||
bool ExistsCell(const ulong&, const ulong&) override noexcept; // Override Matrix member (should not throw exceptions)
|
||||
bool ExistsCell(const ulong&, const ulong&) const noexcept override; // Override Matrix member (should not throw exceptions)
|
||||
|
||||
Data& operator()(const ulong&, const ulong&) override; // Override Matrix member (mutable access to the element; throw out_of_range when out of range)
|
||||
const Data& operator()(const ulong&, const ulong&) const override; // Override Matrix member (immutable access to the element; throw out_of_range when out of range and length_error when not present)
|
||||
|
Reference in New Issue
Block a user