#include <IndexMapping.h>
 | 
|   | IndexMapping (const std::vector< STORAGE_INDEX_TYPE > &indices, const STORAGE_INDEX_TYPE N, const STORAGE_INDEX_TYPE start=0) | 
|   | 
| template<class ITER >  | 
|   | IndexMapping (const ITER &first, const ITER &end, const STORAGE_INDEX_TYPE N, const STORAGE_INDEX_TYPE start=0) | 
|   | 
|   | IndexMapping (const std::set< STORAGE_INDEX_TYPE > &indices, const STORAGE_INDEX_TYPE N, const STORAGE_INDEX_TYPE start=0) | 
|   | 
| template<class T0 , class T1 >  | 
| void  | operator() (Eigen::MatrixBase< T0 > const &input, Eigen::MatrixBase< T1 > const &output) const | 
|   | Creates a vector of elements equal to re-indexed inpu.  More...
  | 
|   | 
| template<class T0 , class T1 >  | 
| void  | adjoint (Eigen::MatrixBase< T0 > const &input, Eigen::MatrixBase< T1 > const &output) const | 
|   | Vector of size N where non-zero elements are chosen from input at given indices.  More...
  | 
|   | 
| t_int  | rows () const | 
|   | 
| STORAGE_INDEX_TYPE  | cols () const | 
|   | 
template<class STORAGE_INDEX_TYPE = t_int>
class purify::IndexMapping< STORAGE_INDEX_TYPE >
Definition at line 11 of file IndexMapping.h.
 
◆ IndexMapping() [1/3]
template<class STORAGE_INDEX_TYPE  = t_int> 
  
  
      
        
          | purify::IndexMapping< STORAGE_INDEX_TYPE >::IndexMapping  | 
          ( | 
          const std::vector< STORAGE_INDEX_TYPE > &  | 
          indices,  | 
         
        
           | 
           | 
          const STORAGE_INDEX_TYPE  | 
          N,  | 
         
        
           | 
           | 
          const STORAGE_INDEX_TYPE  | 
          start = 0  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Definition at line 13 of file IndexMapping.h.
   15       : indices(indices), N(N), start(start){};
 
 
 
 
◆ IndexMapping() [2/3]
template<class STORAGE_INDEX_TYPE  = t_int> 
template<class ITER > 
  
  
      
        
          | purify::IndexMapping< STORAGE_INDEX_TYPE >::IndexMapping  | 
          ( | 
          const ITER &  | 
          first,  | 
         
        
           | 
           | 
          const ITER &  | 
          end,  | 
         
        
           | 
           | 
          const STORAGE_INDEX_TYPE  | 
          N,  | 
         
        
           | 
           | 
          const STORAGE_INDEX_TYPE  | 
          start = 0  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Definition at line 17 of file IndexMapping.h.
   19       : 
IndexMapping(std::vector<STORAGE_INDEX_TYPE>(first, end), N, start) {}
 
IndexMapping(const std::vector< STORAGE_INDEX_TYPE > &indices, const STORAGE_INDEX_TYPE N, const STORAGE_INDEX_TYPE start=0)
 
 
 
 
◆ IndexMapping() [3/3]
template<class STORAGE_INDEX_TYPE  = t_int> 
  
  
      
        
          | purify::IndexMapping< STORAGE_INDEX_TYPE >::IndexMapping  | 
          ( | 
          const std::set< STORAGE_INDEX_TYPE > &  | 
          indices,  | 
         
        
           | 
           | 
          const STORAGE_INDEX_TYPE  | 
          N,  | 
         
        
           | 
           | 
          const STORAGE_INDEX_TYPE  | 
          start = 0  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
 
◆ adjoint()
template<class STORAGE_INDEX_TYPE  = t_int> 
template<class T0 , class T1 > 
  
  
      
        
          | void purify::IndexMapping< STORAGE_INDEX_TYPE >::adjoint  | 
          ( | 
          Eigen::MatrixBase< T0 > const &  | 
          input,  | 
         
        
           | 
           | 
          Eigen::MatrixBase< T1 > const &  | 
          output  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inline   | 
  
 
Vector of size N where non-zero elements are chosen from input at given indices. 
Definition at line 39 of file IndexMapping.h.
   40     assert(
static_cast<size_t>(input.size()) == indices.size());
 
   41     auto &derived = output.const_cast_derived();
 
   42     derived = T1::Zero(N, 1);
 
   43     typename T0::Index i(0);
 
   44     for (STORAGE_INDEX_TYPE 
const &index : indices) {
 
   45       assert(index >= start and index < (N + start));
 
   46       derived(index - start) += input(i++);
 
 
 
 
◆ cols()
template<class STORAGE_INDEX_TYPE  = t_int> 
 
 
◆ operator()()
template<class STORAGE_INDEX_TYPE  = t_int> 
template<class T0 , class T1 > 
  
  
      
        
          | void purify::IndexMapping< STORAGE_INDEX_TYPE >::operator()  | 
          ( | 
          Eigen::MatrixBase< T0 > const &  | 
          input,  | 
         
        
           | 
           | 
          Eigen::MatrixBase< T1 > const &  | 
          output  | 
         
        
           | 
          ) | 
           |  const | 
         
       
   | 
  
inline   | 
  
 
Creates a vector of elements equal to re-indexed inpu. 
Definition at line 26 of file IndexMapping.h.
   27     auto &derived = output.const_cast_derived();
 
   28     derived.resize(indices.size());
 
   29     typename T0::Index i(0);
 
   30     for (
auto const &index : indices) {
 
   31       assert(index >= start and index < (N + start));
 
   32       assert(derived.size() > i);
 
   33       derived(i++) = input(index - start);
 
 
 
 
◆ rows()
template<class STORAGE_INDEX_TYPE  = t_int> 
 
 
The documentation for this class was generated from the following file: