File SimpleGenericMap.h¶
-
namespace
lsst Class for a simple mapping implementing a generic AstrometryTransform.
Remove all non-astronomical counts from the Chunk Exposure’s pixels.
Forward declarations for lsst::utils::Cache
For details on the Cache class, see the Cache.h file.
It uses a template rather than a pointer so that the derived classes can use the specifics of the transform. The class simplePolyMapping overloads a few routines.
A base class for image defects
Numeric constants used by the Integrate.h integrator routines.
Compute Image Statistics
- Note
Gauss-Kronrod-Patterson quadrature coefficients for use in quadpack routine qng. These coefficients were calculated with 101 decimal digit arithmetic by L. W. Fullerton, Bell Labs, Nov 1981.
- Note
The Statistics class itself can only handle lsst::afw::image::MaskedImage() types. The philosophy has been to handle other types by making them look like lsst::afw::image::MaskedImage() and reusing that code. Users should have no need to instantiate a Statistics object directly, but should use the overloaded makeStatistics() factory functions.
-
namespace
afw -
namespace
typehandling -
template<typename
K>
classSimpleGenericMap: public lsst::afw::typehandling::MutableGenericMap<K> - #include <SimpleGenericMap.h>
A GenericMap that allows insertion and deletion of arbitrary values.
In Python, a SimpleGenericMap behaves like a
dict. In particular, it will iterate over keys in the order they were added.- Template Parameters
K: the key type of the map. Must be hashable.
Public Functions
-
SimpleGenericMap()
-
SimpleGenericMap(SimpleGenericMap const &other)
-
SimpleGenericMap(SimpleGenericMap&&)
-
SimpleGenericMap(GenericMap<K> const &other) Convert another GenericMap into a SimpleGenericMap.
This constructor will insert key-value pairs following
other’s iteration order. This may not be the order in which they were inserted into the original map.
-
virtual
~SimpleGenericMap()
-
SimpleGenericMap &
operator=(SimpleGenericMap const &other)
-
SimpleGenericMap &
operator=(SimpleGenericMap&&)
-
SimpleGenericMap &
operator=(GenericMap<K> const &other)
-
GenericMap<K>::size_type
size() const Return the number of key-value pairs in the map.
-
bool
empty() const Return
trueif this map contains no key-value pairs.
-
GenericMap<K>::size_type
max_size() const Return the maximum number of elements the container is able to hold due to system or library implementation limitations.
- Note
This value typically reflects the theoretical limit on the size of the container. At runtime, the size of the container may be limited to a value smaller than max_size() by the amount of RAM available.
-
bool
contains(K const &key) const Return
trueif this map contains a mapping whose key has the specified label.More formally, this method returns
trueif and only if this map contains a mapping with a keyksuch thatk.getId() == key. There can be at most one such mapping.Provides strong exception safety.
- Return
trueif this map contains a mapping forkey, regardless of value type.- Parameters
key: the weakly-typed key to search for
-
std::vector<K> const &
keys() const Return the set of all keys, without type information.
- Return
a read-only view of all keys currently in the map, in the same iteration order as this object. The view will be updated by changes to the underlying map.
- Warning
Do not modify this map while iterating over its keys.
- Warning
Do not store the returned reference in variables that outlive the map; destroying the map will invalidate the reference.
- Note
The keys are returned as a list, rather than a set, so that subclasses can give them a well-defined iteration order.
-
void
clear() Remove all of the mappings from this map.
After this call, the map will be empty.
Protected Functions
-
ConstValueReference
unsafeLookup(K key) const Return a reference to the mapped value of the element with key equal to
key.This method is the primary way to implement the GenericMap interface.
- Return
the value mapped to
key, if one exists- Parameters
key: the key of the element to find
- Exceptions
pex::exceptions::OutOfRangeError: Thrown if the map does not have a value with the specified key Must provide strong exception safety.
-
bool
unsafeInsert(K key, StorableType &&value) Create a new mapping with key equal to
keyand value equal tovalue.This method is the primary way to implement the MutableGenericMap interface.
Must provide strong exception safety.
- Return
trueif the insertion took place,falseotherwise- Parameters
key: the key of the element to insert. The method may assume that the map does not containkey.value: a reference to the value to insert.
-
bool
unsafeErase(K key) Remove the mapping for a key from this map, if it exists.
Must provide strong exception safety.
- Return
trueifkeywas removed,falseif it was not present- Parameters
key: the key to remove
Private Static Functions
-
static std::unordered_map<K, StorableType>
_convertStorage(GenericMap<K> const &map)¶ Create a new back-end map that contains the same mappings as a GenericMap.
Provides strong exception-safety.
- Return
a new map with the same mappings as
map.- Parameters
map: The map whose contents should be copied.
-
template<typename
-
namespace