All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | List of all members
lar::example::CoordRangeCells< Coord > Struct Template Reference

Range of coordinates. More...

#include <SpacePartition.h>

Inheritance diagram for lar::example::CoordRangeCells< Coord >:
lar::example::CoordRange< Coord >

Public Types

using Base_t = CoordRange< Coord >
 
using Coord_t = typename Base_t::Coord_t
 data type for coordinate More...
 
- Public Types inherited from lar::example::CoordRange< Coord >
using Range_t = CoordRange< Coord >
 this type More...
 
using Coord_t = Coord
 data type for coordinate More...
 

Public Member Functions

 CoordRangeCells (Coord_t low, Coord_t high, Coord_t cs)
 Constructor: assigns range and cell size. More...
 
 CoordRangeCells (Base_t const &range, Coord_t cs)
 Constructor: assigns range and cell size. More...
 
std::ptrdiff_t findCell (Coord_t c) const
 Returns the index of the cell for coordinate c. More...
 
- Public Member Functions inherited from lar::example::CoordRange< Coord >
bool contains (Coord_t c) const
 Returns whether c is contained in the range (inclusve) More...
 
bool empty () const
 Returns whether the range is empty. More...
 
bool valid () const
 Returns whether the range is valid (empty is also valid) More...
 
Coord_t size () const
 Returns the size of the range (no check) More...
 
Coord_t offset (Coord_t c) const
 Returns the distance of the specified coordinate from the lower bound. More...
 
bool operator== (const Range_t &as) const
 Returns whether the specified range has the same limits as this. More...
 
bool operator!= (const Range_t &than) const
 Returns whether the specified range has limits different than this. More...
 

Public Attributes

Coord_t cellSize
 size of a single cell More...
 
- Public Attributes inherited from lar::example::CoordRange< Coord >
Coord_t lower
 lower boundary More...
 
Coord_t upper
 upper boundary More...
 

Detailed Description

template<typename Coord>
struct lar::example::CoordRangeCells< Coord >

Range of coordinates.

Definition at line 135 of file SpacePartition.h.

Member Typedef Documentation

template<typename Coord>
using lar::example::CoordRangeCells< Coord >::Base_t = CoordRange<Coord>

Definition at line 136 of file SpacePartition.h.

template<typename Coord>
using lar::example::CoordRangeCells< Coord >::Coord_t = typename Base_t::Coord_t

data type for coordinate

Definition at line 139 of file SpacePartition.h.

Constructor & Destructor Documentation

template<typename Coord >
lar::example::CoordRangeCells< Coord >::CoordRangeCells ( Coord_t  low,
Coord_t  high,
Coord_t  cs 
)

Constructor: assigns range and cell size.

Parameters
lowlower bound of the range
highupper bound of the range
cssize of each cell

Definition at line 410 of file SpacePartition.h.

411  : Base_t(low, high), cellSize(cs)
412  {}
Coord_t cellSize
size of a single cell
CoordRange< Coord > Base_t
standard_dbscan3dalg useful for diagnostics hits not in a line will not be clustered on on only for track like only for track like on on the smaller the less shower like tracks low
template<typename Coord >
lar::example::CoordRangeCells< Coord >::CoordRangeCells ( Base_t const &  range,
Coord_t  cs 
)

Constructor: assigns range and cell size.

Parameters
rangelower and upper bound of the range
cssize of each cell

Definition at line 416 of file SpacePartition.h.

417  : Base_t(range), cellSize(cs)
418  {}
Coord_t cellSize
size of a single cell
CoordRange< Coord > Base_t

Member Function Documentation

template<typename Coord >
std::ptrdiff_t lar::example::CoordRangeCells< Coord >::findCell ( Coord_t  c) const

Returns the index of the cell for coordinate c.

Definition at line 422 of file SpacePartition.h.

423  { return std::ptrdiff_t(Base_t::offset(c) / cellSize); }
Coord_t cellSize
size of a single cell
Coord_t offset(Coord_t c) const
Returns the distance of the specified coordinate from the lower bound.

Member Data Documentation

template<typename Coord>
Coord_t lar::example::CoordRangeCells< Coord >::cellSize

size of a single cell

Definition at line 141 of file SpacePartition.h.


The documentation for this struct was generated from the following file: