docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::symbolic::Assumptions Class Reference

Map from symbols to their assumptions. More...

#include <sdfg/symbolic/assumptions.h>

Classes

class  const_iterator
 Visits the own entries, then the base's entries the own ones do not shadow. More...

Public Types

using Map = std::unordered_map<Symbol, Assumption, SymEngine::RCPBasicHash, SymEngine::RCPBasicKeyEq>
using key_type = Symbol
using mapped_type = Assumption
using value_type = Map::value_type
using size_type = std::size_t
using iterator = Map::iterator

Public Member Functions

 Assumptions ()=default
 Assumptions (std::initializer_list< value_type > entries)
 Assumptions (const Map &entries)
 Assumptions (Map &&entries)
size_type size () const
bool empty () const
void clear ()
const_iterator begin () const
const_iterator end () const
const_iterator cbegin () const
const_iterator cend () const
iterator begin ()
 Mutable iteration: the base is copied in first. The end is the own entries', which mutable finds return too.
iterator end ()
const_iterator find (const Symbol &symbol) const
iterator find (const Symbol &symbol)
 A mutable entry, copied from the base first if only the base holds it.
bool contains (const Symbol &symbol) const
size_type count (const Symbol &symbol) const
const Assumption & at (const Symbol &symbol) const
Assumption & at (const Symbol &symbol)
Assumption & operator[] (const Symbol &symbol)
std::pair< iterator, bool > insert (const value_type &entry)
 Inserts entry unless its symbol has an entry, here or in the base; true if it did.
std::pair< iterator, bool > insert (value_type &&entry)
template<typename InputIt>
void insert (InputIt first, InputIt last)
template<typename... Args>
std::pair< iterator, bool > emplace (Args &&... args)
template<typename... Args>
std::pair< iterator, bool > try_emplace (const Symbol &symbol, Args &&... args)
template<typename M>
std::pair< iterator, bool > insert_or_assign (const Symbol &symbol, M &&value)
Map::node_type extract (const Symbol &symbol)
 Node handles, as for renaming an entry's symbol, work on own entries: the base is copied in first.
Map::insert_return_type insert (Map::node_type &&node)
size_type erase (const Symbol &symbol)
iterator erase (iterator position)

Static Public Member Functions

static Assumptions over (std::shared_ptr< const Map > base)
 An instance holding no entries of its own over base, which it shares.

Detailed Description

Map from symbols to their assumptions.

This type represents a collection of assumptions for multiple symbols. Each symbol maps to its Assumption containing bounds, constness, and evolution.

It behaves as an std::unordered_map from symbols to assumptions, but may share an immutable base map with other instances and hold only the entries that differ from it. Looking an entry up finds it in either; writing to one of the base copies it into the instance first; iterating visits the instance's entries, then the base's others. Iterating, or erasing from, a mutable instance gives it its own copy of the base first.

Member Typedef Documentation

◆ iterator

◆ key_type

◆ Map

using sdfg::symbolic::Assumptions::Map = std::unordered_map<Symbol, Assumption, SymEngine::RCPBasicHash, SymEngine::RCPBasicKeyEq>

◆ mapped_type

◆ size_type

◆ value_type

using sdfg::symbolic::Assumptions::value_type = Map::value_type

Constructor & Destructor Documentation

◆ Assumptions() [1/4]

sdfg::symbolic::Assumptions::Assumptions ( )
default

◆ Assumptions() [2/4]

sdfg::symbolic::Assumptions::Assumptions ( std::initializer_list< value_type > entries)
inline

◆ Assumptions() [3/4]

sdfg::symbolic::Assumptions::Assumptions ( const Map & entries)
inline

◆ Assumptions() [4/4]

sdfg::symbolic::Assumptions::Assumptions ( Map && entries)
inline

Member Function Documentation

◆ at() [1/2]

Assumption & sdfg::symbolic::Assumptions::at ( const Symbol & symbol)
inline

◆ at() [2/2]

const Assumption & sdfg::symbolic::Assumptions::at ( const Symbol & symbol) const
inline

◆ begin() [1/2]

iterator sdfg::symbolic::Assumptions::begin ( )
inline

Mutable iteration: the base is copied in first. The end is the own entries', which mutable finds return too.

◆ begin() [2/2]

const_iterator sdfg::symbolic::Assumptions::begin ( ) const
inline

◆ cbegin()

const_iterator sdfg::symbolic::Assumptions::cbegin ( ) const
inline

◆ cend()

const_iterator sdfg::symbolic::Assumptions::cend ( ) const
inline

◆ clear()

void sdfg::symbolic::Assumptions::clear ( )
inline

◆ contains()

bool sdfg::symbolic::Assumptions::contains ( const Symbol & symbol) const
inline

◆ count()

size_type sdfg::symbolic::Assumptions::count ( const Symbol & symbol) const
inline

◆ emplace()

template<typename... Args>
std::pair< iterator, bool > sdfg::symbolic::Assumptions::emplace ( Args &&... args)
inline

◆ empty()

bool sdfg::symbolic::Assumptions::empty ( ) const
inline

◆ end() [1/2]

iterator sdfg::symbolic::Assumptions::end ( )
inline

◆ end() [2/2]

const_iterator sdfg::symbolic::Assumptions::end ( ) const
inline

◆ erase() [1/2]

size_type sdfg::symbolic::Assumptions::erase ( const Symbol & symbol)
inline

◆ erase() [2/2]

iterator sdfg::symbolic::Assumptions::erase ( iterator position)
inline

◆ extract()

Map::node_type sdfg::symbolic::Assumptions::extract ( const Symbol & symbol)
inline

Node handles, as for renaming an entry's symbol, work on own entries: the base is copied in first.

◆ find() [1/2]

iterator sdfg::symbolic::Assumptions::find ( const Symbol & symbol)
inline

A mutable entry, copied from the base first if only the base holds it.

◆ find() [2/2]

const_iterator sdfg::symbolic::Assumptions::find ( const Symbol & symbol) const
inline

◆ insert() [1/4]

std::pair< iterator, bool > sdfg::symbolic::Assumptions::insert ( const value_type & entry)
inline

Inserts entry unless its symbol has an entry, here or in the base; true if it did.

The entry the symbol has either way is a mutable one.

◆ insert() [2/4]

template<typename InputIt>
void sdfg::symbolic::Assumptions::insert ( InputIt first,
InputIt last )
inline

◆ insert() [3/4]

Map::insert_return_type sdfg::symbolic::Assumptions::insert ( Map::node_type && node)
inline

◆ insert() [4/4]

std::pair< iterator, bool > sdfg::symbolic::Assumptions::insert ( value_type && entry)
inline

◆ insert_or_assign()

template<typename M>
std::pair< iterator, bool > sdfg::symbolic::Assumptions::insert_or_assign ( const Symbol & symbol,
M && value )
inline

◆ operator[]()

Assumption & sdfg::symbolic::Assumptions::operator[] ( const Symbol & symbol)
inline

◆ over()

Assumptions sdfg::symbolic::Assumptions::over ( std::shared_ptr< const Map > base)
inlinestatic

An instance holding no entries of its own over base, which it shares.

◆ size()

size_type sdfg::symbolic::Assumptions::size ( ) const
inline

◆ try_emplace()

template<typename... Args>
std::pair< iterator, bool > sdfg::symbolic::Assumptions::try_emplace ( const Symbol & symbol,
Args &&... args )
inline

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