IMP  2.1.0
The Integrative Modeling Platform
PairContainerStatistics.h
Go to the documentation of this file.
1 /**
2  * \file IMP/container/PairContainerStatistics.h
3  * \brief A container for Pairs.
4  *
5  * WARNING This file was generated from PairContainerStatistics.h
6  * in /tmp/nightly-build-90783/imp-2.1.0/tools/build/container_templates/container
7  * by tools/maintenance/setup_containers.py.
8  *
9  * Copyright 2007-2013 IMP Inventors. All rights reserved.
10  */
11 
12 #ifndef IMPCONTAINER_PAIR_CONTAINER_STATISTICS_H
13 #define IMPCONTAINER_PAIR_CONTAINER_STATISTICS_H
14 
15 #include <IMP/container/container_config.h>
16 #include <IMP/PairContainer.h>
17 #include <IMP/ScoreState.h>
18 #include <IMP/score_state_macros.h>
19 #include <IMP/base/set.h>
20 
21 IMPCONTAINER_BEGIN_NAMESPACE
22 
23 //! Track statistics on a PairContainer
24 /** The current statistics are average and min/max occupancy. Other
25  statistics can be added on request, but we probably want to
26  restrict it to ones that are cheap to gather. */
27 class IMPCONTAINEREXPORT PairContainerStatistics : public ScoreState {
29  unsigned int total_;
30  unsigned int checks_;
31  unsigned int max_;
32  unsigned int min_;
33  bool track_unique_;
35 
36  public:
37  PairContainerStatistics(PairContainerAdaptor c);
38  void show_statistics(std::ostream &out) const;
39  /** Keeping track of the number of unique entries seen is
40  expensive, so it is not done by default.
41  */
42  void set_track_unique(bool tf);
43  virtual void do_before_evaluate() IMP_OVERRIDE;
44  virtual void do_after_evaluate(DerivativeAccumulator *da) IMP_OVERRIDE;
45  virtual kernel::ModelObjectsTemp do_get_inputs() const IMP_OVERRIDE;
46  virtual kernel::ModelObjectsTemp do_get_outputs() const IMP_OVERRIDE;
48 };
49 
50 IMPCONTAINER_END_NAMESPACE
51 
52 #endif /* IMPCONTAINER_PAIR_CONTAINER_STATISTICS_H */
Class for adding derivatives from restraints to the model.
A smart pointer to a reference counted object.
Definition: base/Pointer.h:87
ScoreStates maintian invariants in the Model.
Import IMP/kernel/PairContainer.h in the namespace.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Import IMP/kernel/ScoreState.h in the namespace.
Track statistics on a PairContainer.
Import IMP/kernel/score_state_macros.h in the namespace.
virtual ModelObjectsTemp do_get_inputs() const =0
Declare an efficient stl-compatible set.
virtual ModelObjectsTemp do_get_outputs() const =0