Namespaces | |
| namespace | _continue_class |
| namespace | _yaml |
Classes | |
| class | Angle |
| class | AngleInterval |
AngleInterval represents closed intervals of arbitrary angles. More... | |
| class | BigInteger |
| class | Box |
| class | Box3d |
| class | Chunker |
| class | Circle |
| class | CompoundRegion |
| class | ConvexPolygon |
| class | Ellipse |
| class | HtmPixelization |
| class | IntersectionRegion |
| class | Interval |
| class | Interval1d |
| class | LonLat |
| class | Matrix3d |
| A 3x3 matrix with real entries stored in double precision. More... | |
| class | Mq3cPixelization |
| class | NormalizedAngle |
| class | NormalizedAngleInterval |
| class | Pixelization |
| class | Q3cPixelization |
| class | RangeSet |
| class | Region |
| struct | SubChunks |
| class | TriState |
| class | UnionRegion |
| class | UnitVector3d |
| class | Vector3d |
Vector3d is a vector in ℝ³ with components stored in double precision. More... | |
Typedefs | |
| using | Relationship = std::bitset<3> |
Relationship describes how two sets are related. | |
Functions | |
| Angle | operator* (double a, Angle const &b) |
| std::ostream & | operator<< (std::ostream &, Angle const &) |
| double | sin (Angle const &a) |
| double | cos (Angle const &a) |
| double | tan (Angle const &a) |
| Angle | abs (Angle const &a) |
| std::ostream & | operator<< (std::ostream &, AngleInterval const &) |
| std::ostream & | operator<< (std::ostream &, Box const &) |
| std::ostream & | operator<< (std::ostream &, Box3d const &) |
| std::ostream & | operator<< (std::ostream &, Circle const &) |
| void | encodeDouble (double item, std::vector< std::uint8_t > &buffer) |
| double | decodeDouble (std::uint8_t const *buffer) |
| void | encodeU64 (std::uint64_t item, std::vector< std::uint8_t > &buffer) |
| std::uint64_t | decodeU64 (std::uint8_t const *buffer) |
| std::ostream & | operator<< (std::ostream &, ConvexPolygon const &) |
| std::uint64_t | mortonIndex (std::uint32_t x, std::uint32_t y) |
| std::tuple< std::uint32_t, std::uint32_t > | mortonIndexInverse (std::uint64_t z) |
| std::uint64_t | mortonToHilbert (std::uint64_t z, int m) |
| std::uint64_t | hilbertToMorton (std::uint64_t h, int m) |
| std::uint64_t | hilbertIndex (std::uint32_t x, std::uint32_t y, int m) |
| std::tuple< std::uint32_t, std::uint32_t > | hilbertIndexInverse (std::uint64_t h, int m) |
| std::ostream & | operator<< (std::ostream &, Ellipse const &) |
| std::ostream & | operator<< (std::ostream &, Interval1d const &) |
| std::ostream & | operator<< (std::ostream &, LonLat const &) |
| std::ostream & | operator<< (std::ostream &, Matrix3d const &) |
| NormalizedAngle const & | abs (NormalizedAngle const &a) |
| std::ostream & | operator<< (std::ostream &, NormalizedAngleInterval const &) |
| int | orientationExact (Vector3d const &a, Vector3d const &b, Vector3d const &c) |
| int | orientation (UnitVector3d const &a, UnitVector3d const &b, UnitVector3d const &c) |
| int | orientationX (UnitVector3d const &b, UnitVector3d const &c) |
orientationX(b, c) is equivalent to orientation(UnitVector3d::X(), b, c). | |
| int | orientationY (UnitVector3d const &b, UnitVector3d const &c) |
orientationY(b, c) is equivalent to orientation(UnitVector3d::Y(), b, c). | |
| int | orientationZ (UnitVector3d const &b, UnitVector3d const &c) |
orientationZ(b, c) is equivalent to orientation(UnitVector3d::Z(), b, c). | |
| template<typename Pybind11Class> | |
| void | defineClass (Pybind11Class &cls) |
| void | swap (RangeSet &a, RangeSet &b) |
| std::ostream & | operator<< (std::ostream &, RangeSet const &) |
| Relationship | invert (Relationship r) |
| std::ostream & | operator<< (std::ostream &stream, TriState const &value) |
| std::ostream & | operator<< (std::ostream &, UnitVector3d const &) |
| double | getMinSquaredChordLength (Vector3d const &v, Vector3d const &a, Vector3d const &b, Vector3d const &n) |
| double | getMaxSquaredChordLength (Vector3d const &v, Vector3d const &a, Vector3d const &b, Vector3d const &n) |
| Angle | getMinAngleToCircle (Angle x, Angle c) |
| Angle | getMaxAngleToCircle (Angle x, Angle c) |
| Vector3d | getWeightedCentroid (UnitVector3d const &v0, UnitVector3d const &v1, UnitVector3d const &v2) |
| Vector3d | operator* (double s, Vector3d const &v) |
| std::ostream & | operator<< (std::ostream &, Vector3d const &) |
| template<> | |
| void | defineClass (py::classh< Angle > &cls) |
| template<> | |
| void | defineClass (py::classh< AngleInterval > &cls) |
| template<> | |
| void | defineClass (py::classh< Box, Region > &cls) |
| template<> | |
| void | defineClass (py::classh< Box3d > &cls) |
| template<> | |
| void | defineClass (py::classh< Chunker > &cls) |
| template<> | |
| void | defineClass (py::classh< Circle, Region > &cls) |
| template<> | |
| void | defineClass (py::classh< CompoundRegion, Region > &cls) |
| template<> | |
| void | defineClass (py::classh< UnionRegion, CompoundRegion > &cls) |
| template<> | |
| void | defineClass (py::classh< IntersectionRegion, CompoundRegion > &cls) |
| template<> | |
| void | defineClass (py::classh< ConvexPolygon, Region > &cls) |
| void | defineCurve (py::module &mod) |
| template<> | |
| void | defineClass (py::classh< Ellipse, Region > &cls) |
| template<> | |
| void | defineClass (py::classh< HtmPixelization, Pixelization > &cls) |
| template<> | |
| void | defineClass (py::classh< Interval1d > &cls) |
| template<> | |
| void | defineClass (py::classh< LonLat > &cls) |
| template<> | |
| void | defineClass (py::classh< Matrix3d > &cls) |
| template<> | |
| void | defineClass (py::classh< Mq3cPixelization, Pixelization > &cls) |
| template<> | |
| void | defineClass (py::classh< NormalizedAngle > &cls) |
| template<> | |
| void | defineClass (py::classh< NormalizedAngleInterval > &cls) |
| void | defineOrientation (py::module &mod) |
| template<> | |
| void | defineClass (py::classh< Pixelization > &cls) |
| template<> | |
| void | defineClass (py::classh< Q3cPixelization, Pixelization > &cls) |
| template<> | |
| void | defineClass (py::classh< RangeSet > &cls) |
| template<> | |
| void | defineClass (py::classh< Region > &cls) |
| void | defineRelationship (py::module &mod) |
| void | defineUtils (py::module &) |
| template<> | |
| void | defineClass (py::classh< UnitVector3d > &cls) |
| template<> | |
| void | defineClass (py::classh< Vector3d > &cls) |
| std::uint8_t | log2 (std::uint64_t x) |
| std::uint8_t | log2 (std::uint32_t x) |
lsst.sphgeom
|
inline |
decodeDouble extracts an IEEE double from the 8 byte little-endian byte sequence in buffer.
|
inline |
decodeU64 extracts an uint64 from the 8 byte little-endian byte sequence in buffer.
|
inline |
encodeDouble appends an IEEE double in little-endian byte order to the end of buffer.
|
inline |
encodeU64 appends an uint64 in little-endian byte order to the end of buffer.
getMaxAngleToCircle returns the maximum angular separation between a point at latitude x and the points on the circle of constant latitude c.
| double lsst::sphgeom::getMaxSquaredChordLength | ( | Vector3d const & | v, |
| Vector3d const & | a, | ||
| Vector3d const & | b, | ||
| Vector3d const & | n ) |
Let p be the unit vector furthest from v that lies on the plane with normal n in the direction of the cross product of a and b. If p is in the interior of the great circle segment from a to b, then this helper function returns the squared chord length between p and v. Otherwise it returns 0 - the minimum squared chord length between any pair of points on the sphere.
getMinAngleToCircle returns the minimum angular separation between a point at latitude x and the points on the circle of constant latitude c.
| double lsst::sphgeom::getMinSquaredChordLength | ( | Vector3d const & | v, |
| Vector3d const & | a, | ||
| Vector3d const & | b, | ||
| Vector3d const & | n ) |
Let p be the unit vector closest to v that lies on the plane with normal n in the direction of the cross product of a and b. If p is in the interior of the great circle segment from a to b, then this function returns the squared chord length between p and v. Otherwise it returns 4 - the maximum squared chord length between any pair of points on the unit sphere.
| Vector3d lsst::sphgeom::getWeightedCentroid | ( | UnitVector3d const & | v0, |
| UnitVector3d const & | v1, | ||
| UnitVector3d const & | v2 ) |
getWeightedCentroid returns the center of mass of the given spherical triangle (assuming a uniform mass distribution over the triangle surface), weighted by the triangle area.
|
inline |
hilbertIndex returns the index of (x, y) in a 2-D Hilbert curve.
Only the m least significant bits of x and y are used. Computing the Hilbert index of a point has been measured to take 4 to 15 times as long as computing its Morton index on an Intel Core i7-3820QM CPU. With Xcode 7.3 and -O3, latency is ~19ns per call at a CPU frequency of 3.5 GHz.
|
inline |
hilbertIndexInverse returns the point (x, y) with Hilbert index h, where x and y are m bit integers.
|
inline |
hilbertToMorton converts the 2m-bit Hilbert index h to the corresponding Morton index.
|
inline |
Given the relationship between two sets A and B (i.e. the output of A.relate(B)), invert returns the relationship between B and A (B.relate(A)).
|
inline |
log2 returns the index of the most significant 1 bit in x. If x is 0, the return value is 0.
A beautiful algorithm to find this index is presented in:
Using de Bruijn Sequences to Index a 1 in a Computer Word C. E. Leiserson, H. Prokop, and K. H. Randall. http://supertech.csail.mit.edu/papers/debruijn.pdf
|
inline |
mortonIndex interleaves the bits of x and y.
The 32 even bits of the return value will be the bits of x, and the 32 odd bits those of y. This is the z-value of (x,y) defined by the Morton order function. See https://en.wikipedia.org/wiki/Z-order_curve for more information.
|
inline |
mortonIndexInverse separates the even and odd bits of z.
The 32 even bits of z are returned in the first element of the result tuple, and the 32 odd bits in the second. This is the inverse of mortonIndex().
|
inline |
mortonToHilbert converts the 2m-bit Morton index z to the corresponding Hilbert index.
| int lsst::sphgeom::orientation | ( | UnitVector3d const & | a, |
| UnitVector3d const & | b, | ||
| UnitVector3d const & | c ) |
orientation computes and returns the orientations of 3 unit vectors a, b and c. The return value is +1 if the vectors are in counter-clockwise orientation, 0 if they are coplanar, colinear or identical, and -1 if they are in clockwise orientation.
This is equivalent to computing the sign of the scalar triple product a · (b x c), which is the sign of the determinant of the 3x3 matrix with a, b and c as columns/rows.
The implementation proceeds by first computing a double precision approximation, and then falling back to arbitrary precision arithmetic when necessary. Consequently, the result is exact.
orientationExact computes and returns the orientations of 3 vectors a, b and c, which need not be normalized but are assumed to have finite components. The return value is +1 if the vectors a, b, and c are in counter-clockwise orientation, 0 if they are coplanar, colinear, or identical, and -1 if they are in clockwise orientation. The implementation uses arbitrary precision arithmetic to avoid floating point rounding error, underflow and overflow.