Ignore:
Timestamp:
Aug 20, 2014, 1:06:16 PM (11 years ago)
Author:
Frederik Heber <heber@…>
Children:
1cde4e8
Parents:
1ae9aa
git-author:
Frederik Heber <heber@…> (06/30/14 09:35:42)
git-committer:
Frederik Heber <heber@…> (08/20/14 13:06:16)
Message:

SphericalPointDistribution is now working with bond degree weights.

  • recurseMatching() now works on IndexTupleList_t.
  • also rewrote calculatePairwiseDistances() and calculateErrorOfMatching().
  • L1THRESHOLD in recurseMatching() moved over to class body.
  • increased verbosity level of ...Matching() functions by one, added note on eventually chosen matching and why.
  • we assert that bestL2 is not too large.
  • FIX: calculateErrorOfMatching() did not use absolute value of gap for L1 error.
  • TESTS: Regresssion test FragmentMolecule-cycles working again.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/Exporters/SphericalPointDistribution.hpp

    r1ae9aa r23c605  
    8989  //!> precalculated value for root of 3
    9090  const double SQRT_3;
     91  //!> threshold for L1 error below which matching is immediately acceptable
     92  static const double L1THRESHOLD;
     93  //!> threshold for L2 error below which matching is acceptable
     94  static const double L2THRESHOLD;
    9195
    9296  //!> typedef for a full rotation specification consisting of axis and angle.
     
    103107  //!> typedef for a Vector of positions with weights
    104108  typedef std::vector< std::pair<Vector, int> > WeightedVectorArray_t;
     109  //!> typedef for a vector of degrees (or integral weights)
     110  typedef std::vector<unsigned int> WeightsArray_t;
    105111
    106112  //!> amplitude up to which deviations in checks of rotations are tolerated
     
    112118
    113119  static std::pair<double, double> calculateErrorOfMatching(
    114       const std::vector<Vector> &_old,
    115       const std::vector<Vector> &_new,
    116       const IndexList_t &_Matching);
     120      const VectorArray_t &_old,
     121      const VectorArray_t &_new,
     122      const IndexTupleList_t &_Matching);
    117123
    118124  static Polygon_t removeMatchingPoints(
     
    124130    bool foundflag;
    125131    double bestL2;
    126     IndexList_t bestmatching;
     132    IndexTupleList_t bestmatching;
    127133    VectorArray_t oldpoints;
    128134    VectorArray_t newpoints;
     135    WeightsArray_t weights;
    129136  };
    130137
    131138  static void recurseMatchings(
    132139      MatchingControlStructure &_MCS,
    133       IndexList_t &_matching,
     140      IndexTupleList_t &_matching,
    134141      IndexList_t _indices,
    135       unsigned int _matchingsize);
     142      WeightsArray_t &_remainingweights,
     143      WeightsArray_t::iterator _remainiter,
     144      const unsigned int _matchingsize
     145      );
    136146
    137147  static IndexList_t findBestMatching(
Note: See TracChangeset for help on using the changeset viewer.