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

Method updateBestCost

biteaux.h:1992–2009  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1990 */
1991
1992 void updateBestCost( const double UpdCost, const double* const UpdValues,
1993 int p = -1 )
1994 {
1995 if( p < 0 )
1996 {
1997 if( UpdCost <= BestCost )
1998 {
1999 p = 0;
2000 }
2001 }
2002
2003 if( p == 0 )
2004 {
2005 BestCost = UpdCost;
2006
2007 copyValues( BestValues, UpdValues );
2008 }
2009 }
2010
2011 /**
2012 * Function checks the supplied cost value for NaN and returns a "fixed"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected