libcuspatial  24.04.00
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables | Friends
Types

Classes

class  cuspatial::box< T, Vertex >
 A generic axis-aligned box type. More...
 
class  cuspatial::segment< T, Vertex >
 A generic segment type. More...
 
class  cuspatial::vec_2d< T >
 A generic 2D vector type. More...
 
class  cuspatial::vec_3d< T >
 A generic 3D vector type. More...
 

Typedefs

using cuspatial::segment< T, Vertex >::value_type = T
 
using cuspatial::vec_3d< T >::value_type = T
 

Functions

template<typename T >
 cuspatial::box (vec_2d< T > a, vec_2d< T > b) -> box< T, vec_2d< T > >
 
segment< T > CUSPATIAL_HOST_DEVICE cuspatial::segment< T, Vertex >::translate (Vertex const &v) const
 Return a copy of segment, translated by v.
 
Vertex CUSPATIAL_HOST_DEVICE cuspatial::segment< T, Vertex >::center () const
 Return the geometric center of segment.
 
T CUSPATIAL_HOST_DEVICE cuspatial::segment< T, Vertex >::length2 () const
 Return the length squared of segment.
 
T CUSPATIAL_HOST_DEVICE cuspatial::segment< T, Vertex >::slope ()
 Return slope of segment.
 
Vertex CUSPATIAL_HOST_DEVICE cuspatial::segment< T, Vertex >::lower_left ()
 Return the lower left vertex of segment.
 
bool CUSPATIAL_HOST_DEVICE cuspatial::segment< T, Vertex >::collinear (segment< T > const &other)
 
template<typename T >
 cuspatial::segment (vec_2d< T > a, vec_2d< T > b) -> segment< T, vec_2d< T > >
 
template<typename T >
 cuspatial::segment (thrust::device_reference< vec_2d< T > > a, thrust::device_reference< vec_2d< T > > b) -> segment< T, vec_2d< T > >
 
template<typename T >
 cuspatial::vec_2d (T x, T y) -> vec_2d< T >
 
template<typename T >
T CUSPATIAL_HOST_DEVICE cuspatial::dot (vec_2d< T > const &a, vec_2d< T > const &b)
 Compute dot product of two 2D vectors.
 
template<typename T >
T CUSPATIAL_HOST_DEVICE cuspatial::det (vec_2d< T > const &a, vec_2d< T > const &b)
 Compute 2D determinant of a 2x2 matrix with column vectors a and b.
 
template<typename T >
vec_2d< T > CUSPATIAL_HOST_DEVICE cuspatial::box_min (vec_2d< T > const &a, vec_2d< T > const &b)
 Return a new vec_2d made up of the minimum x- and y-components of two input vec_2d values.
 
template<typename T >
vec_2d< T > CUSPATIAL_HOST_DEVICE cuspatial::box_max (vec_2d< T > const &a, vec_2d< T > const &b)
 Return a new vec_2d made up of the minimum x- and y-components of two input vec_2d values.
 
template<typename T >
vec_2d< T > CUSPATIAL_HOST_DEVICE cuspatial::midpoint (vec_2d< T > const &first, vec_2d< T > const &second)
 Compute the midpoint of first and second.
 
template<typename T >
 cuspatial::vec_3d (T x, T y, T z) -> vec_3d< T >
 
template<typename T >
T CUSPATIAL_HOST_DEVICE cuspatial::dot (vec_3d< T > const &a, vec_3d< T > const &b)
 Compute dot product of two 3D vectors.
 
template<typename T >
vec_3d< T > CUSPATIAL_HOST_DEVICE cuspatial::cross (vec_3d< T > const &a, vec_3d< T > const &b)
 Compute cross product of two 3D vectors.
 

Variables

Vertex cuspatial::segment< T, Vertex >::v1
 
Vertex cuspatial::segment< T, Vertex >::v2
 
value_type cuspatial::vec_3d< T >::x
 
value_type cuspatial::vec_3d< T >::y
 
value_type cuspatial::vec_3d< T >::z
 

Friends

std::ostream & cuspatial::segment< T, Vertex >::operator<< (std::ostream &os, segment< T > const &seg)
 
std::ostream & cuspatial::vec_3d< T >::operator<< (std::ostream &os, cuspatial::vec_3d< T > const &vec)
 Output stream operator for vec_3d<T> for human-readable formatting.
 
bool CUSPATIAL_HOST_DEVICE cuspatial::vec_3d< T >::operator== (vec_3d< T > const &lhs, vec_3d< T > const &rhs)
 Compare two 3D vectors for equality.
 
vec_3d< T > CUSPATIAL_HOST_DEVICE cuspatial::vec_3d< T >::operator+ (vec_3d< T > const &a, vec_3d< T > const &b)
 Element-wise addition of two 3D vectors.
 
vec_3d< T > CUSPATIAL_HOST_DEVICE cuspatial::vec_3d< T >::operator- (vec_3d< T > const &a, vec_3d< T > const &b)
 Element-wise subtraction of two 3D vectors.
 
vec_3d< T > CUSPATIAL_HOST_DEVICE cuspatial::vec_3d< T >::operator- (vec_3d< T > const &a)
 Invert a 3D vector.
 
vec_3d< T > CUSPATIAL_HOST_DEVICE cuspatial::vec_3d< T >::operator* (vec_3d< T > vec, T const &r)
 Scale a 3D vector by a factor r.
 
vec_3d< T > CUSPATIAL_HOST_DEVICE cuspatial::vec_3d< T >::operator* (T const &r, vec_3d< T > vec)
 Scale a 3d vector by ratio r.
 
vec_3d< T > &CUSPATIAL_HOST_DEVICE cuspatial::vec_3d< T >::operator+= (vec_3d< T > &a, vec_3d< T > const &b)
 Translate a 3D point.
 
vec_3d< T > &CUSPATIAL_HOST_DEVICE cuspatial::vec_3d< T >::operator-= (vec_3d< T > &a, vec_3d< T > const &b)
 Translate a 3D point.
 
bool CUSPATIAL_HOST_DEVICE cuspatial::vec_3d< T >::operator< (vec_3d< T > const &lhs, vec_3d< T > const &rhs)
 Less than operator for two 3D points.
 
bool CUSPATIAL_HOST_DEVICE cuspatial::vec_3d< T >::operator> (vec_3d< T > const &lhs, vec_3d< T > const &rhs)
 Greater than operator for two 3D points.
 
bool CUSPATIAL_HOST_DEVICE cuspatial::vec_3d< T >::operator<= (vec_3d< T > const &lhs, vec_3d< T > const &rhs)
 Less than or equal to operator for two 3D points.
 
bool CUSPATIAL_HOST_DEVICE cuspatial::vec_3d< T >::operator>= (vec_3d< T > const &lhs, vec_3d< T > const &rhs)
 Greater than or equal to operator for two 3D points.
 

Detailed Description

Typedef Documentation

◆ value_type [1/2]

template<typename T , typename Vertex = cuspatial::vec_2d<T>>
using cuspatial::segment< T, Vertex >::value_type = T

Definition at line 42 of file segment.cuh.

◆ value_type [2/2]

template<typename T >
using cuspatial::vec_3d< T >::value_type = T

Definition at line 42 of file vec_3d.hpp.

Function Documentation

◆ box_max()

template<typename T >
vec_2d< T > CUSPATIAL_HOST_DEVICE cuspatial::box_max ( vec_2d< T > const & a,
vec_2d< T > const & b )

Return a new vec_2d made up of the minimum x- and y-components of two input vec_2d values.

Definition at line 198 of file vec_2d.hpp.

◆ box_min()

template<typename T >
vec_2d< T > CUSPATIAL_HOST_DEVICE cuspatial::box_min ( vec_2d< T > const & a,
vec_2d< T > const & b )

Return a new vec_2d made up of the minimum x- and y-components of two input vec_2d values.

Definition at line 185 of file vec_2d.hpp.

◆ center()

template<typename T , typename Vertex = cuspatial::vec_2d<T>>
Vertex CUSPATIAL_HOST_DEVICE cuspatial::segment< T, Vertex >::center ( ) const
inline

Return the geometric center of segment.

Definition at line 53 of file segment.cuh.

◆ collinear()

template<typename T , typename Vertex = cuspatial::vec_2d<T>>
bool CUSPATIAL_HOST_DEVICE cuspatial::segment< T, Vertex >::collinear ( segment< T > const & other)
inline

Returns true if two segments are on the same line Test if the determinant of the matrix, of which the column vector is constructed from the segments is 0.

Definition at line 67 of file segment.cuh.

◆ cross()

template<typename T >
vec_3d< T > CUSPATIAL_HOST_DEVICE cuspatial::cross ( vec_3d< T > const & a,
vec_3d< T > const & b )

Compute cross product of two 3D vectors.

Equivalent to 3D determinant of a 2x2 matrix with column vectors a and b.

Definition at line 179 of file vec_3d.hpp.

◆ det()

template<typename T >
T CUSPATIAL_HOST_DEVICE cuspatial::det ( vec_2d< T > const & a,
vec_2d< T > const & b )

Compute 2D determinant of a 2x2 matrix with column vectors a and b.

Definition at line 176 of file vec_2d.hpp.

◆ dot() [1/2]

template<typename T >
T CUSPATIAL_HOST_DEVICE cuspatial::dot ( vec_2d< T > const & a,
vec_2d< T > const & b )

Compute dot product of two 2D vectors.

Definition at line 167 of file vec_2d.hpp.

◆ dot() [2/2]

template<typename T >
T CUSPATIAL_HOST_DEVICE cuspatial::dot ( vec_3d< T > const & a,
vec_3d< T > const & b )

Compute dot product of two 3D vectors.

Definition at line 168 of file vec_3d.hpp.

◆ length2()

template<typename T , typename Vertex = cuspatial::vec_2d<T>>
T CUSPATIAL_HOST_DEVICE cuspatial::segment< T, Vertex >::length2 ( ) const
inline

Return the length squared of segment.

Definition at line 56 of file segment.cuh.

◆ lower_left()

template<typename T , typename Vertex = cuspatial::vec_2d<T>>
Vertex CUSPATIAL_HOST_DEVICE cuspatial::segment< T, Vertex >::lower_left ( )
inline

Return the lower left vertex of segment.

Definition at line 62 of file segment.cuh.

◆ midpoint()

template<typename T >
vec_2d< T > CUSPATIAL_HOST_DEVICE cuspatial::midpoint ( vec_2d< T > const & first,
vec_2d< T > const & second )

Compute the midpoint of first and second.

Definition at line 211 of file vec_2d.hpp.

◆ slope()

template<typename T , typename Vertex = cuspatial::vec_2d<T>>
T CUSPATIAL_HOST_DEVICE cuspatial::segment< T, Vertex >::slope ( )
inline

Return slope of segment.

Definition at line 59 of file segment.cuh.

◆ translate()

template<typename T , typename Vertex = cuspatial::vec_2d<T>>
segment< T > CUSPATIAL_HOST_DEVICE cuspatial::segment< T, Vertex >::translate ( Vertex const & v) const
inline

Return a copy of segment, translated by v.

Definition at line 47 of file segment.cuh.

Variable Documentation

◆ v1

template<typename T , typename Vertex = cuspatial::vec_2d<T>>
Vertex cuspatial::segment< T, Vertex >::v1

Definition at line 43 of file segment.cuh.

◆ v2

template<typename T , typename Vertex = cuspatial::vec_2d<T>>
Vertex cuspatial::segment< T, Vertex >::v2

Definition at line 44 of file segment.cuh.

◆ x

template<typename T >
value_type cuspatial::vec_3d< T >::x

Definition at line 43 of file vec_3d.hpp.

◆ y

template<typename T >
value_type cuspatial::vec_3d< T >::y

Definition at line 44 of file vec_3d.hpp.

◆ z

template<typename T >
value_type cuspatial::vec_3d< T >::z

Definition at line 45 of file vec_3d.hpp.

Friends

◆ operator* [1/2]

template<typename T >
vec_3d< T > CUSPATIAL_HOST_DEVICE operator* ( T const & r,
vec_3d< T > vec )
friend

Scale a 3d vector by ratio r.

Definition at line 100 of file vec_3d.hpp.

◆ operator* [2/2]

template<typename T >
vec_3d< T > CUSPATIAL_HOST_DEVICE operator* ( vec_3d< T > vec,
T const & r )
friend

Scale a 3D vector by a factor r.

Definition at line 92 of file vec_3d.hpp.

◆ operator+

template<typename T >
vec_3d< T > CUSPATIAL_HOST_DEVICE operator+ ( vec_3d< T > const & a,
vec_3d< T > const & b )
friend

Element-wise addition of two 3D vectors.

Definition at line 68 of file vec_3d.hpp.

◆ operator+=

template<typename T >
vec_3d< T > &CUSPATIAL_HOST_DEVICE operator+= ( vec_3d< T > & a,
vec_3d< T > const & b )
friend

Translate a 3D point.

Definition at line 105 of file vec_3d.hpp.

◆ operator- [1/2]

template<typename T >
vec_3d< T > CUSPATIAL_HOST_DEVICE operator- ( vec_3d< T > const & a)
friend

Invert a 3D vector.

Definition at line 84 of file vec_3d.hpp.

◆ operator- [2/2]

template<typename T >
vec_3d< T > CUSPATIAL_HOST_DEVICE operator- ( vec_3d< T > const & a,
vec_3d< T > const & b )
friend

Element-wise subtraction of two 3D vectors.

Definition at line 76 of file vec_3d.hpp.

◆ operator-=

template<typename T >
vec_3d< T > &CUSPATIAL_HOST_DEVICE operator-= ( vec_3d< T > & a,
vec_3d< T > const & b )
friend

Translate a 3D point.

Definition at line 116 of file vec_3d.hpp.

◆ operator<

template<typename T >
bool CUSPATIAL_HOST_DEVICE operator< ( vec_3d< T > const & lhs,
vec_3d< T > const & rhs )
friend

Less than operator for two 3D points.

Orders two points first by x, then by y.

Definition at line 126 of file vec_3d.hpp.

◆ operator<< [1/2]

template<typename T >
std::ostream & operator<< ( std::ostream & os,
cuspatial::vec_3d< T > const & vec )
friend

Output stream operator for vec_3d<T> for human-readable formatting.

Definition at line 51 of file vec_3d.hpp.

◆ operator<< [2/2]

template<typename T , typename Vertex = cuspatial::vec_2d<T>>
std::ostream & operator<< ( std::ostream & os,
segment< T > const & seg )
friend

Definition at line 73 of file segment.cuh.

◆ operator<=

template<typename T >
bool CUSPATIAL_HOST_DEVICE operator<= ( vec_3d< T > const & lhs,
vec_3d< T > const & rhs )
friend

Less than or equal to operator for two 3D points.

Definition at line 146 of file vec_3d.hpp.

◆ operator==

template<typename T >
bool CUSPATIAL_HOST_DEVICE operator== ( vec_3d< T > const & lhs,
vec_3d< T > const & rhs )
friend

Compare two 3D vectors for equality.

Definition at line 59 of file vec_3d.hpp.

◆ operator>

template<typename T >
bool CUSPATIAL_HOST_DEVICE operator> ( vec_3d< T > const & lhs,
vec_3d< T > const & rhs )
friend

Greater than operator for two 3D points.

Definition at line 138 of file vec_3d.hpp.

◆ operator>=

template<typename T >
bool CUSPATIAL_HOST_DEVICE operator>= ( vec_3d< T > const & lhs,
vec_3d< T > const & rhs )
friend

Greater than or equal to operator for two 3D points.

Definition at line 154 of file vec_3d.hpp.