IMP logo
IMP Reference Guide  2.16.0
The Integrative Modeling Platform
ProfileClustering.h
Go to the documentation of this file.
1 /**
2  * \file IMP/saxs/ProfileClustering.h
3  * \brief A class for profile clustering
4  *
5  * \authors Dina Schneidman
6  * Copyright 2007-2021 IMP Inventors. All rights reserved.
7  *
8  */
9 
10 #ifndef IMPSAXS_PROFILE_CLUSTERING_H
11 #define IMPSAXS_PROFILE_CLUSTERING_H
12 
13 #include <IMP/saxs/Profile.h>
14 
15 IMPSAXS_BEGIN_NAMESPACE
16 
17 /** Class for profile clustering */
18 class IMPSAXSEXPORT ProfileClustering {
19 public:
20  ProfileClustering(Profile* exp_profile,
21  const Profiles& profiles,
22  double chi_percentage = 0.3, double chi_threshold = 0.0);
23 
24  ProfileClustering(Profile* exp_profile,
25  const Profiles& profiles,
26  const Vector<double>& scores,
27  double chi_percentage = 0.3, double chi_threshold = 0.0);
28 
29  const Vector<Profiles>& get_clusters() const {
30  return clusters_;
31  }
32 
33  const Profiles& get_representatives() const {
34  return clustered_profiles_;
35  }
36 
37 private:
38  void cluster_profiles();
39  void select_representatives();
40 
41 private:
42  PointerMember<const Profile> exp_profile_;
43  const Profiles profiles_;
44  const Vector<double> scores_;
45 
46  Vector<double> chi_scores_;
47  Profiles clustered_profiles_;
48  Vector<Profiles> clusters_;
49  double chi_percentage_;
50  double chi_threshold_;
51 };
52 
53 IMPSAXS_END_NAMESPACE
54 
55 #endif /* IMPSAXS_PROFILE_CLUSTERING_H */
A more IMP-like version of the std::vector.
Definition: Vector.h:40
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:146
A class for profile storing and computation.
Ints get_representatives(Embedding *d, PartitionalClustering *pc)