progressing implementation of permutations

This commit is contained in:
2021-05-13 16:45:10 +02:00
parent 01665674c5
commit 60e8a379f5
9 changed files with 201 additions and 6 deletions

11
mat.h
View File

@@ -24,6 +24,10 @@
namespace LA {
//forward declaration
template<typename T> class NRPerm;
/***************************************************************************//**
* \brief NRMat<T> class template implementing the matrix interface
* @see NRVec<T>, NRSMat<T>
@@ -111,6 +115,12 @@ public:
//! ensure that the data of this matrix are referenced exactly once
void copyonwrite(bool detachonly=false);
//! permute matrix elements
const NRMat permute_rows(const NRPerm<int> &p) const;
const NRMat permute_cols(const NRPerm<int> &p) const;
const NRMat permute_both(const NRPerm<int> &p, const NRPerm<int> &q) const;
/***************************************************************************//**
* routines for CUDA related stuff
* \li <code>getlocation()</code> gets the protected data member location
@@ -376,6 +386,7 @@ public:
#include "smat.h"
#include "sparsemat.h"
#include "sparsesmat.h"
#include "permutation.h"
namespace LA {