All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Member Functions | List of all members
geo::part::WidthPartition< Data > Class Template Reference

Partition of area along the width dimension. More...

#include <Partitions.h>

Inheritance diagram for geo::part::WidthPartition< Data >:
geo::part::PartitionSortedByRange< Data,&PartitionBase::Area_t::width > geo::part::SortedPartition< Data, details::PartitionSorterByAreaRangeLower< Range > > geo::part::PartitionContainer< Data > geo::part::PartitionWithData< Data > geo::part::Partition< Data > geo::part::PartitionBase geo::part::AreaOwner

Public Types

using Base_t = PartitionSortedByRange< Data,&PartitionBase::Area_t::width >
 Base class. More...
 
using Base_t = SortedPartition< Data, details::PartitionSorterByAreaRangeLower< Range >>
 Base class. More...
 
using Base_t = PartitionContainer< Data >
 Base class. More...
 
- Public Types inherited from geo::part::PartitionSortedByRange< Data,&PartitionBase::Area_t::width >
using Base_t = SortedPartition< Data, details::PartitionSorterByAreaRangeLower< Range >>
 Base class. More...
 
using Base_t = PartitionContainer< Data >
 Base class. More...
 
- Public Types inherited from geo::part::SortedPartition< Data, details::PartitionSorterByAreaRangeLower< Range > >
using Base_t = PartitionContainer< Data >
 Base class. More...
 
using Partition_t = Partition< Data >
 Base type of the partition. More...
 
using Sorter_t = details::PartitionSorterByAreaRangeLower< Range >
 Type of sorter being used. More...
 
using Data_t = typename Partition_t::Data_t
 
using Area_t = typename Partition_t::Area_t
 
using Subpartitions_t = typename Base_t::Subpartitions_t
 
- Public Types inherited from geo::part::PartitionContainer< Data >
using Base_t = PartitionWithData< Data >
 Base class. More...
 
using Partition_t = Partition< Data >
 Base type of the partition. More...
 
using Data_t = typename Partition_t::Data_t
 
using Area_t = typename Partition_t::Area_t
 
using Subpartitions_t = typename Partition_t::Subpartitions_t
 
- Public Types inherited from geo::part::PartitionWithData< Data >
using Base_t = Partition< Data >
 Base class. More...
 
using Partition_t = Partition< Data >
 Base type of the partition. More...
 
using Data_t = typename Partition_t::Data_t
 Type of contained data. More...
 
using Area_t = typename Partition_t::Area_t
 Type of covered area. More...
 
- Public Types inherited from geo::part::Partition< Data >
using Data_t = Data
 Type of data stored in the partition. More...
 
using Partition_t = Partition< Data >
 This type. More...
 
using Area_t = PartitionBase::Area_t
 Type of area. More...
 
using Subpartitions_t = std::vector< std::unique_ptr< Partition_t const >>
 Type of list of subpartitions. It needs to preserve polymorphism. More...
 
- Public Types inherited from geo::part::PartitionBase
using Area_t = AreaOwner::Area_t
 
using AreaRangeMember_t = AreaOwner::AreaRangeMember_t
 
- Public Types inherited from geo::part::AreaOwner
using Area_t = lar::util::simple_geo::Rectangle< double >
 Type of area covered by the partition. More...
 
using AreaRangeMember_t = Area_t::Range_t(Area_t::*)
 Type of pointer to Area_t data member of type Range_t. More...
 

Public Member Functions

virtual Base_t::Partition_t const * findPart (double w, double) const override
 Returns the only partition which could contain the specified depth. More...
 
- Public Member Functions inherited from geo::part::SortedPartition< Data, details::PartitionSorterByAreaRangeLower< Range > >
 SortedPartition (Area_t const &area, Subpartitions_t &&subpartitions, Data_t *defData=nullptr, Sorter_t sorter={})
 Constructor: sets the partition. More...
 
- Public Member Functions inherited from geo::part::PartitionContainer< Data >
virtual Data_tatPoint (double w, double d) const override
 Returns stored datum only if point is covered, nullptr otherwise. More...
 
- Public Member Functions inherited from geo::part::PartitionWithData< Data >
 PartitionWithData (Area_t const &area, Data_t *myData)
 Constructor: sets the covered area and the contained datum. More...
 
virtual Data_tdata () const override
 Returns the datum directly stored (nullptr if none). More...
 
- Public Member Functions inherited from geo::part::Partition< Data >
 Partition (Area_t const &area)
 Constructor: sets the covered area and no subpartitions. More...
 
virtual ~Partition ()=default
 Destructor (default, virtual). More...
 
std::string describe (std::string indent, std::string firstIndent) const
 Returns a description of the partition. More...
 
std::string describe (std::string indent="") const
 Returns a description of the partition. More...
 
template<typename Pred >
void walk (Pred &&pred) const
 Applies pred to all partitions. More...
 
std::size_t nParts () const
 Returns the number of subparts in the partition (0 if simple element). More...
 
- Public Member Functions inherited from geo::part::PartitionBase
 PartitionBase (Area_t const &area)
 Constructor: sets the covered area and no subpartitions. More...
 
- Public Member Functions inherited from geo::part::AreaOwner
 AreaOwner (Area_t const &area)
 Constructor: sets the covered area and no subpartitions. More...
 
bool contains (double w, double d) const
 Returns whether the specified point is covered by this object. More...
 
Area_t const & area () const
 Returns the covered area. More...
 
template<typename Stream >
void dumpArea (Stream &&out) const
 Output the owned area into an output stream. More...
 

Private Member Functions

virtual std::string describeIntro () const override
 Introduction to the description of the subpartitions. More...
 

Additional Inherited Members

- Protected Member Functions inherited from geo::part::SortedPartition< Data, details::PartitionSorterByAreaRangeLower< Range > >
Partition_t const * findPartWithKey (double key) const
 Returns the only partition which could contain the specified key. More...
 
void initParts ()
 Performs initialization on the specified subpartition list. More...
 
- Protected Member Functions inherited from geo::part::PartitionContainer< Data >
std::size_t size () const
 Returns the number of contained subpartitions. More...
 
virtual Subpartitions_t const & parts () const override
 Returns a list of the subpartitions owned. More...
 
 PartitionContainer (Area_t const &area, Subpartitions_t &&subpartitions, Data_t *defData=nullptr)
 Constructor: sets the partition. More...
 
virtual std::string doDescribe (std::string indent, std::string firstIndent) const override
 Describes this and each of the subpartitions. More...
 
- Protected Member Functions inherited from geo::part::PartitionBase
std::string describeArea (std::string indent, std::string firstIndent) const
 Returns a description of the partition area. More...
 
- Static Protected Member Functions inherited from geo::part::Partition< Data >
template<typename Pred >
static void walk (Partition_t const *start, Pred &&pred)
 
- Protected Attributes inherited from geo::part::SortedPartition< Data, details::PartitionSorterByAreaRangeLower< Range > >
Sorter_t sorter
 Object used for sorting and binary search. More...
 
- Protected Attributes inherited from geo::part::PartitionContainer< Data >
Subpartitions_t myParts
 List of subpartitions. More...
 
- Static Protected Attributes inherited from geo::part::Partition< Data >
static Subpartitions_t const NoSubparts
 Subpartitions (if any). More...
 

Detailed Description

template<typename Data>
class geo::part::WidthPartition< Data >

Partition of area along the width dimension.

Definition at line 489 of file Partitions.h.

Member Typedef Documentation

Base class.

Definition at line 495 of file Partitions.h.

template<typename Data >
using geo::part::SortedPartition< Data, Sorter >::Base_t = PartitionContainer<Data>

Base class.

Definition at line 399 of file Partitions.h.

Base class.

Definition at line 455 of file Partitions.h.

Member Function Documentation

template<typename Data >
std::string geo::part::WidthPartition< Data >::describeIntro ( ) const
overrideprivatevirtual

Introduction to the description of the subpartitions.

Reimplemented from geo::part::PartitionContainer< Data >.

Definition at line 922 of file Partitions.h.

922  {
923  std::ostringstream sstr;
924  sstr
925  << Base_t::size() << " partitions along width covering " << Base_t::area();
926  return sstr.str();
927 } // geo::part::WidthPartition<Data>::describeIntro()
Area_t const & area() const
Returns the covered area.
Definition: Partitions.h:56
std::size_t size() const
Returns the number of contained subpartitions.
Definition: Partitions.h:340
template<typename Data >
virtual Base_t::Partition_t const* geo::part::WidthPartition< Data >::findPart ( double  w,
double   
) const
inlineoverridevirtual

Returns the only partition which could contain the specified depth.

Implements geo::part::PartitionContainer< Data >.

Definition at line 501 of file Partitions.h.

502  { return Base_t::findPartWithKey(w); }
Partition_t const * findPartWithKey(double key) const
Returns the only partition which could contain the specified key.

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