GooseFEM 1.4.1.dev2+g78f16df
Loading...
Searching...
No Matches
assertions.h
Go to the documentation of this file.
1
7#ifndef GOOSEFEM_ASSERTIONS_H
8#define GOOSEFEM_ASSERTIONS_H
9
10#include "config.h"
11
12namespace GooseFEM {
13
19template <class T>
20inline bool is_unique(const T& arg)
21{
23 array_type::tensor<typename T::value_type, 1> unique = xt::unique(flat);
25
26 if (unique.size() != sorted.size()) {
27 return false;
28 }
29
30 return xt::all(xt::equal(unique, sorted));
31}
32
33} // namespace GooseFEM
34
35#endif
Basic configuration:
xt::xtensor< T, N > tensor
Fixed (static) rank array.
Definition config.h:177
Toolbox to perform finite element computations.
Definition Allocate.h:14
bool is_unique(const T &arg)
Returns true is a list is unique (has not duplicate items).
Definition assertions.h:20