Ignore:
Timestamp:
May 25, 2016, 7:13:59 AM (9 years ago)
Author:
Frederik Heber <heber@…>
Children:
4b96da
Parents:
7e9402
git-author:
Frederik Heber <heber@…> (06/30/14 09:35:42)
git-committer:
Frederik Heber <heber@…> (05/25/16 07:13:59)
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.
  • TESTFIX: Using limited accuracy on point coordinates.
  • TESTS: Regresssion test FragmentMolecule-cycles working again.
File:
1 edited

Legend:

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

    r7e9402 r4d611d  
    8080  //!> precalculated value for root of 3
    8181  static const double SQRT_3;
     82  //!> threshold for L1 error below which matching is immediately acceptable
     83  static const double L1THRESHOLD;
     84  //!> threshold for L2 error below which matching is acceptable
     85  static const double L2THRESHOLD;
    8286
    8387  //!> typedef for a full rotation specification consisting of axis and angle.
     
    9498  //!> typedef for a Vector of positions with weights
    9599  typedef std::vector< std::pair<Vector, int> > WeightedVectorArray_t;
     100  //!> typedef for a vector of degrees (or integral weights)
     101  typedef std::vector<unsigned int> WeightsArray_t;
    96102
    97103  //!> amplitude up to which deviations in checks of rotations are tolerated
     
    103109
    104110  static std::pair<double, double> calculateErrorOfMatching(
    105       const std::vector<Vector> &_old,
    106       const std::vector<Vector> &_new,
    107       const IndexList_t &_Matching);
     111      const VectorArray_t &_old,
     112      const VectorArray_t &_new,
     113      const IndexTupleList_t &_Matching);
    108114
    109115  static Polygon_t removeMatchingPoints(
     
    115121    bool foundflag;
    116122    double bestL2;
    117     IndexList_t bestmatching;
     123    IndexTupleList_t bestmatching;
    118124    VectorArray_t oldpoints;
    119125    VectorArray_t newpoints;
     126    WeightsArray_t weights;
    120127  };
    121128
    122129  static void recurseMatchings(
    123130      MatchingControlStructure &_MCS,
    124       IndexList_t &_matching,
     131      IndexTupleList_t &_matching,
    125132      IndexList_t _indices,
    126       unsigned int _matchingsize);
     133      WeightsArray_t &_remainingweights,
     134      WeightsArray_t::iterator _remainiter,
     135      const unsigned int _matchingsize
     136      );
    127137
    128138  static IndexList_t findBestMatching(
Note: See TracChangeset for help on using the changeset viewer.