//****************************************************************** // X p a n d P o i n t // // Evaluates one grid intersection only and advances indexes so // the next call will evaluate the next one. //****************************************************************** int XpandPoint( SurfaceGrid &Zgrid, ScatData &RandomData ) { static float Zvalue; //assert( xIndex < NumXcoords ); //assert( yIndex < NumYcoords ); if( NumDataPoints < 3 ) return 0; // Select the closest point in each octant surround the grid point. SelectPoints( RandomData, Zgrid) ; // Check if point can be included and if so.. calculate it. if ( IncludeGridPoint() > 0 ) Zvalue = WeightedAverage(RandomData); else Zvalue = UndefinedZ; Zgrid.zset(xIndex, yIndex, Zvalue ) ; // Move to next grid intersection.... ++xIndex; if( xIndex >= NumXcoords ) { ++yIndex; xIndex= 0; } if( yIndex >= NumYcoords ){ Locator.New(0, NumXcoords, NumYcoords); return 0; } ++NumberDone; //assert( NumberDone <= TotalGridPoints); return 1; }
DefuzzifierFactory::DefuzzifierFactory() { registerClass(Bisector().className(), &(Bisector::constructor)); registerClass(Centroid().className(), &(Centroid::constructor)); registerClass(LargestOfMaximum().className(), &(LargestOfMaximum::constructor)); registerClass(MeanOfMaximum().className(), &(MeanOfMaximum::constructor)); registerClass(SmallestOfMaximum().className(), &(SmallestOfMaximum::constructor)); registerClass(WeightedAverage().className(), &(WeightedAverage::constructor)); registerClass(WeightedSum().className(), &(WeightedSum::constructor)); }