IMP logo
IMP Reference Guide  2.22.0
The Integrative Modeling Platform
TripletContainerStatistics.h
Go to the documentation of this file.
1 // Autogenerated by ../../../../tmp/nightly-build-470/imp-2.22.0/tools/build/make_containers.py
2 // from ../../../../tmp/nightly-build-470/imp-2.22.0/tools/build/container_templates/container/ClassnameContainerStatistics.h
3 // Do not edit - any changes will be lost!
4 
5 /**
6  * \file IMP/container/TripletContainerStatistics.h
7  * \brief A container for Triplets.
8  *
9  * Copyright 2007-2022 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPCONTAINER_TRIPLET_CONTAINER_STATISTICS_H
13 #define IMPCONTAINER_TRIPLET_CONTAINER_STATISTICS_H
14 
15 #include <IMP/container/container_config.h>
16 #include <IMP/TripletContainer.h>
17 #include <IMP/ScoreState.h>
18 #include <boost/unordered_set.hpp>
19 
20 IMPCONTAINER_BEGIN_NAMESPACE
21 
22 //! Track statistics on a TripletContainer
23 /** The current statistics are average and min/max occupancy. Other
24  statistics can be added on request, but we probably want to
25  restrict it to ones that are cheap to gather. */
26 class IMPCONTAINEREXPORT TripletContainerStatistics : public ScoreState {
27  Pointer<TripletContainer> container_;
28  unsigned int total_;
29  unsigned int checks_;
30  unsigned int max_;
31  unsigned int min_;
32  bool track_unique_;
33  boost::unordered_set<ParticleTriplet> unique_;
34 
35  public:
37  void show_statistics(std::ostream &out) const;
38  /** Keeping track of the number of unique entries seen is
39  expensive, so it is not done by default.
40  */
41  void set_track_unique(bool tf);
42  virtual void do_before_evaluate() override;
43  virtual void do_after_evaluate(DerivativeAccumulator *da) override;
44  virtual ModelObjectsTemp do_get_inputs() const override;
45  virtual ModelObjectsTemp do_get_outputs() const override;
47 };
48 
49 IMPCONTAINER_END_NAMESPACE
50 
51 #endif /* IMPCONTAINER_TRIPLET_CONTAINER_STATISTICS_H */
virtual void do_before_evaluate()=0
Update the state given the current state of the model.
A container for Triplets.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Track statistics on a TripletContainer.
virtual void do_after_evaluate(DerivativeAccumulator *accpt)=0
Do any necessary updates after the model score is calculated.
A more IMP-like version of the std::vector.
Definition: Vector.h:50
A smart pointer to a reference counted object.
Definition: Pointer.h:87
ScoreStates maintain invariants in the Model.
Definition: ScoreState.h:56
Shared score state.
virtual ModelObjectsTemp do_get_outputs() const =0
virtual ModelObjectsTemp do_get_inputs() const =0
Class for adding derivatives from restraints to the model.