MCPcopy Create free account
hub / github.com/avaneev/biteopt / removeSol

Method removeSol

biteaux.h:1020–1038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1018 */
1019
1020 void removeSol( const int p )
1021 {
1022 if( CurPopPos == 0 )
1023 {
1024 return;
1025 }
1026
1027 const int ri = CurPopPos - 1;
1028
1029 if( p < ri )
1030 {
1031 ptype** const pp = PopParams + p;
1032 ptype* const rp = *pp;
1033 memmove( pp, pp + 1, ( ri - p ) * sizeof( pp[ 0 ]));
1034 PopParams[ ri ] = rp;
1035 }
1036
1037 CurPopPos--;
1038 }
1039
1040 /**
1041 * Function replaces the highest-cost previous solution, updates centroid.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected