inc

Symbolic

class Symbolic

Public Functions

Symbolic()
explicit Symbolic(const std::vector<std::string> &expressions, const std::vector<std::string> &variables = {}, const std::vector<std::pair<std::string, double>> &constants = {}, const std::vector<SymbolicFunction> &functions = {}, bool allow_unknown_symbols = false)
explicit Symbolic(const std::string &expression, const std::vector<std::string> &variables = {}, const std::vector<std::pair<std::string, double>> &constants = {}, const std::vector<SymbolicFunction> &functions = {}, bool allow_unknown_symbols = false)
bool parse(const std::vector<std::string> &expressions, const std::vector<std::string> &variables = {}, const std::vector<std::pair<std::string, double>> &constants = {}, const std::vector<SymbolicFunction> &functions = {}, bool allow_unknown_symbols = false)
bool parse(const std::string &expression, const std::vector<std::string> &variables = {}, const std::vector<std::pair<std::string, double>> &constants = {}, const std::vector<SymbolicFunction> &functions = {}, bool allow_unknown_symbols = false)
bool compile(bool doCSE = true, unsigned optLevel = 3)
std::string expr(std::size_t i = 0) const
std::string inlinedExpr(std::size_t i = 0) const
std::string diff(const std::string &var, std::size_t i = 0) const
void relabel(const std::vector<std::string> &newVariables)
void rescale(double factor, const std::vector<std::string> &exclusions = {})
void eval(std::vector<double> &results, const std::vector<double> &vars = {}) const
void eval(double *results, const double *vars) const
bool isValid() const
bool isCompiled() const
const std::string &getErrorMessage() const
void clear()

TiffReader

class TiffReader

Public Functions

explicit TiffReader(const std::string &filename)
bool empty() const
sme::common::ImageStack getImages() const
const QString &getErrorMessage() const

serialization.hpp

namespace sme
namespace common
struct SmeFileContents

Public Members

std::string xmlModel = {}
std::unique_ptr<simulate::SimulationData> simulationData = {}

utils.hpp

namespace sme
namespace common

Typedefs

template<typename T>
using unique_C_ptr = std::unique_ptr<T, free_deleter>

Functions

template<typename Container>
Container::value_type sum(const Container &c)

The sum of all elements in a container.

template<typename Container>
Container::value_type average(const Container &c)

The average of all elements in a container.

template<typename Container>
Container::value_type min(const Container &c)

The minimum value in a container.

template<typename Container>
Container::value_type max(const Container &c)

The maximum value in a container.

template<typename Container>
std::vector<typename Container::value_type> get_unique_values(const Container &c)

The unique values from a container.

template<typename Container>
bool isItIndexes(const Container &c, std::size_t length)

Are the numbers in the container indexes?

template<typename Container>
std::pair<typename Container::value_type, typename Container::value_type> minmax(const Container &c)

The minimum and maximum values in a container.

template<typename Container, typename Element>
std::size_t element_index(const Container &c, const Element &e, std::size_t index_if_not_found = 0)

The index in the container of the matching element.

template<typename T>
constexpr auto decltypeStr()

The type of an object as a string.

template<typename T>
std::vector<T> stringToVector(const std::string &str)

Convert a string to a vector of values.

The values in the string are separated by spaces.

Template Parameters:

T – the type of the values

template<typename T>
std::string vectorToString(const std::vector<T> &vec)

Convert a vector of values to a string.

The values in the string are separated by spaces. Doubles are printed in scientific notation with 17 significant digits.

Template Parameters:

T – the type of the values

template<typename T>
void cyclicErase(std::vector<T> &v, std::size_t first, std::size_t last)

Cyclic erase of elements from a vector.

Erase the elements with index [first, last) from the vector v, with cyclic indices, i.e. the next element after the last element is the first element of the vector

Template Parameters:

T – the value type

template<typename T>
bool isCyclicPermutation(const std::vector<T> &a, const std::vector<T> &b)

Check if a vector is a cyclic permutation of another vector.

Note

Assumes the elements of the vector are unique

Template Parameters:

T – the value type

class indexedColours
#include <utils.hpp>

Default set of colours.

A vector of default colours

Public Functions

const QColor &operator[](std::size_t i) const

Private Static Attributes

static const std::vector<QColor> colours = std::vector<QColor>{{230, 25, 75}, {60, 180, 75}, {255, 225, 25}, {0, 130, 200}, {245, 130, 48}, {145, 30, 180}, {70, 240, 240}, {240, 50, 230}, {210, 245, 60}, {250, 190, 190}, {0, 128, 128}, {230, 190, 255}, {170, 110, 40}, {255, 250, 200}, {128, 0, 0}, {170, 255, 195}, {128, 128, 0}, {255, 215, 180}, {0, 0, 128}, {128, 128, 128}}
struct free_deleter

Public Functions

template<typename T>
inline void operator()(T *p) const