Ignore:
Timestamp:
01/20/07 14:03:37 (17 years ago)
Author:
bittner
Message:

mutation updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.h

    r1997 r2001  
    4747        // halton sequence for generatin gmutations of this ray 
    4848        VssRay *mRay; 
    49         int mMutations; 
    50         int mUnsuccessfulMutations; 
     49        short mMutations; 
     50        short mUnsuccessfulMutations; 
    5151        HaltonSequence mHalton; 
    5252        float mImportance; 
    5353        float mCdf; 
    5454 
     55        Vector3 mutatedOrigin; 
     56        Vector3 mutatedTermination; 
     57         
    5558        float GetSamplingFactor() const { return mMutations/mImportance; } 
    5659        RayEntry() {} 
     
    5962                                                mUnsuccessfulMutations(0), 
    6063                                                mHalton(), 
    61                                                 mImportance(1.0f) {} 
     64                                                mImportance(1.0f) 
     65        { 
     66          ResetReverseMutation(); 
     67        } 
     68 
     69        void ResetReverseMutation() { 
     70          mutatedOrigin = mutatedTermination = Vector3(0,0,0); 
     71        } 
     72        bool HasReverseMutation() const { 
     73          return !(mutatedOrigin == mutatedTermination); 
     74        } 
     75         
     76        void SetReverseMutation(const Vector3 &a, const Vector3 &b) { 
     77          mutatedOrigin = a; 
     78          mutatedTermination = b; 
     79        } 
     80 
    6281  }; 
    63  
     82   
    6483 
    6584  Vector3 
     
    90109                                                                           ); 
    91110 
     111 
     112  bool 
     113  ComputeReverseMutation( 
     114                                                 const VssRay &oldRay, 
     115                                                 const VssRay &newRay, 
     116                                                 Vector3 &origin, 
     117                                                 Vector3 &termination 
     118                                                 ); 
     119 
    92120  RayEntry &GetEntry(const int index) { 
    93121        return mRays[(mBufferStart+index)%mRays.size()]; 
Note: See TracChangeset for help on using the changeset viewer.