lsst.astshim g545b398f03+ce83317b7e
Public Member Functions | Public Attributes | List of all members
ast::MapSplit Class Reference

#include <MapSplit.h>

Public Member Functions

 MapSplit (Mapping const &map, std::vector< int > const &in)
 
 MapSplit (MapSplit const &)=default
 
 MapSplit (MapSplit &&)=default
 
MapSplitoperator= (MapSplit const &)=default
 
MapSplitoperator= (MapSplit &&)=default
 

Public Attributes

std::shared_ptr< MappingsplitMap
 
std::vector< int > origIn
 
std::vector< int > origOut
 

Detailed Description

A Mapping split off as a subset of another Mapping.

Constructor & Destructor Documentation

◆ MapSplit() [1/3]

ast::MapSplit::MapSplit ( Mapping const &  map,
std::vector< int > const &  in 
)
explicit

Construct a MapSplit

The subset is specified by choosing a subset of inputs from an existing Mapping. Such a split is only possible if the specified inputs correspond to some subset of the original Mapping's outputs. That is, there must exist a subset of the Mapping outputs for which each output depends only on the selected Mapping inputs, and not on any of the inputs which have not been selected. Also, any output which is not in this subset must not depend on any of the selected inputs.

Parameters
[in]mapMapping to split.
[in]inIndices of inputs of map to pick. Each element should have a value in the range [1, map.getNIn()].
Exceptions
std::runtime_errorif map cannot be split as specified.

◆ MapSplit() [2/3]

ast::MapSplit::MapSplit ( MapSplit const &  )
default

◆ MapSplit() [3/3]

ast::MapSplit::MapSplit ( MapSplit &&  )
default

Member Function Documentation

◆ operator=() [1/2]

MapSplit & ast::MapSplit::operator= ( MapSplit &&  )
default

◆ operator=() [2/2]

MapSplit & ast::MapSplit::operator= ( MapSplit const &  )
default

Member Data Documentation

◆ origIn

std::vector<int> ast::MapSplit::origIn

Indices of the inputs of the original mapping were picked for the split mapping

This is a copy of the in argument of the constructor.

◆ origOut

std::vector<int> ast::MapSplit::origOut

Indices of the outputs of the original mapping which are fed by the picked inputs.

This will contain splitMap->getNOut() elements, each in the range [1, nout of the original mapping]. The ith element holds the index within the original mapping which corresponds to the ith output of the split mapping. For example if the 1st output of the split mapping came from the 5th output of the original mapping, then origOut[0] = 5 (0 because vectors use 0-based indexing, and 5 because AST index values are 1-based).

◆ splitMap

std::shared_ptr<Mapping> ast::MapSplit::splitMap

The Mapping that was split off.


The documentation for this class was generated from the following files: