Go to the documentation of this file.
42 return "[" + std::to_string(
x) +
", " + std::to_string(
y) +
"]";
127 return std::hash<std::string>()(selector.
member);
140 #if defined(__APPLE__) && defined(__clang__)
141 # if (__clang_major__ >= 10)
144 #elif defined(__clang__)
145 # if (__clang_major__ >= 7)
153 py::class_<Vector2>(
m,
"Vector2")
154 .def(py::init<float, float>())
181 .def(
"__abs__", [](
const Vector2 &
v) {
return abs(
v); });
183 m.attr(
"Vector") =
m.attr(
"Vector2");
189 py::class_<C2>(
m,
"C2")
192 .def(
"__add__", [](
const C2 &
c2,
const C1 &
c1) {
return c2 +
c1; })
193 .def(
"__radd__", [](
const C2 &
c2,
const C1 &
c1) {
return c1 +
c2; });
200 py::class_<NestABase>(
m,
"NestABase")
204 struct NestA : NestABase {
211 py::class_<NestA>(
m,
"NestA")
216 [](NestA &
a) -> NestABase & {
return (NestABase &)
a; },
217 py::return_value_policy::reference_internal);
218 m.def(
"get_NestA", [](
const NestA &
a) {
return a.value; });
228 py::class_<NestB>(
m,
"NestB")
232 m.def(
"get_NestB", [](
const NestB &
b) {
return b.value; });
242 py::class_<NestC>(
m,
"NestC")
246 m.def(
"get_NestC", [](
const NestC &
c) {
return c.value; });
252 bool operator==(
const Comparable &rhs)
const {
return value == rhs.value; }
255 struct Hashable : Comparable {
256 explicit Hashable(
int value) : Comparable{
value} {};
257 size_t hash()
const {
return static_cast<size_t>(
value); }
260 struct Hashable2 : Hashable {
261 using Hashable::Hashable;
264 py::class_<Comparable>(
m,
"Comparable").def(py::init<int>()).def(
py::self ==
py::self);
266 py::class_<Hashable>(
m,
"Hashable")
267 .def(py::init<int>())
272 py::class_<Hashable2>(
m,
"Hashable2")
274 .def(py::init<int>())
280 m.def(
"get_unhashable_HashMe_set", []() {
return std::unordered_set<HashMe>{{
"one"}}; });
friend Vector2 operator-(float f, const Vector2 &v)
Vector2 & operator*=(float v)
friend Vector2 operator/(float f, const Vector2 &v)
Vector2(const Vector2 &v)
bool operator!=(const Vector2 &v) const
Vector2(float x, float y)
Vector2 & operator+=(const Vector2 &v)
Vector2 operator-() const
Vector2 operator/(const Vector2 &v) const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 & operator*=(bfloat16 &a, const bfloat16 &b)
TEST_SUBMODULE(operators, m)
friend Vector2 operator+(float f, const Vector2 &v)
bool operator==(const HashMe &lhs, const HashMe &rhs)
void print_copy_created(T *inst, Values &&...values)
friend Vector2 operator*(float f, const Vector2 &v)
Vector2(Vector2 &&v) noexcept
Vector2 operator*(float value) const
bool operator==(const Vector2 &v) const
Vector2 & operator=(Vector2 &&v) noexcept
std::string abs(const Vector2 &)
void print_copy_assigned(T *inst, Values &&...values)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 & operator-=(bfloat16 &a, const bfloat16 &b)
Vector2 & operator-=(const Vector2 &v)
Vector2 operator*(const Vector2 &v) const
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
size_t operator()(const Vector2 &)
void print_move_created(T *inst, Values &&...values)
std::string toString() const
void print_destroyed(T *inst, Values &&...values)
Vector2 operator+(float value) const
Array< int, Dynamic, 1 > v
Vector2 operator-(float value) const
void print_move_assigned(T *inst, Values &&...values)
Vector2 & operator=(const Vector2 &v)
Vector2 & operator/=(float v)
Vector2 operator-(const Vector2 &v) const
int operator+(const C1 &, const C1 &)
Vector2 operator+(const Vector2 &v) const
Vector2 operator/(float value) const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 & operator+=(bfloat16 &a, const bfloat16 &b)
std::size_t operator()(const HashMe &selector) const
Vector2 & operator/=(const Vector2 &v)
void print_created(T *inst, Values &&...values)
#define PYBIND11_WARNING_DISABLE_CLANG(name)
Vector2 & operator*=(const Vector2 &v)
gtsam
Author(s):
autogenerated on Thu Dec 19 2024 04:05:56