54#include <gtest/gtest.h>
61using namespace testing;
75 for (
int i = 0; i < 5; ++i) {
79 for (
int i = 0; i < 3; ++i) {
98 for (
int i = 0; i < 5; ++i) {
119 for (
int i = 0; i < 5; ++i) {
386 for (
int i = 0; i < 5; ++i) {
473 double result = v1 * v2;
487 double result = v1 * v2;
499 double result = v1 * v2;
609 while (it.has_curr()) {
639 std::string str = v.
to_str();
754 while (it.has_curr()) {
832 double dot = v1 * v2;
856 ::testing::InitGoogleTest(&
argc,
argv);
Exception handling system with formatted messages for Aleph-w.
Integer domain classes for sparse data structures.
Sparse vector with named elements.
Generic domain class based on hash set.
Dynamic singly linked list with functional programming support.
T & append(const T &item)
Append a new item by copy.
size_t size() const noexcept
Count the number of elements of the list.
Sparse vector implementation with domain-based indexing.
const Domain & get_domain() const noexcept
Get the domain over which this vector is defined.
void set_entry(const T &i, const NumType &value)
Set a vector entry at given index.
const NumType & get_epsilon() const noexcept
Get the epsilon value used for zero comparisons.
Iterator get_it() const noexcept
NumType * search_entry(const T &i) const noexcept
Search for an entry and return pointer to its value.
bool are_equal(const NumType &n1, const NumType &n2) const noexcept
Check if two numeric values are equal within epsilon.
DynList< NumType > to_list() const
void set_epsilon(const NumType &e) noexcept
Set the epsilon value for zero comparisons.
NumType get_entry(const T &i)
Get vector entry at given index (non-const version)
void set_entries(std::initializer_list< T > ld, std::initializer_list< NumType > lr)
Set multiple entries using initializer lists.
std::string to_str() const
NumType scalar_product(const Vector &v) const
AlDomain< std::string > domain_str
Main namespace for Aleph-w library functions.
Itor2 copy(Itor1 sourceBeg, const Itor1 &sourceEnd, Itor2 destBeg)
Copy elements from one range to another.
DynList< T > maps(const C &c, Op op)
Classic map operation.
Itor::difference_type count(const Itor &beg, const Itor &end, const T &value)
Count elements equal to a value.
T sum(const Container &container, const T &init=T{})
Compute sum of all elements.
TEST_F(VectorTest, DefaultConstructor)