NDOSolver / FiOracle
Interfaces and Solvers for NonDifferentiable Optimization
Loading...
Searching...
No Matches
BMinQuad.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/*--------------------------- File BMinQuad.h ------------------------------*/
3/*--------------------------------------------------------------------------*/
31/*--------------------------------------------------------------------------*/
32/*----------------------------- DEFINITIONS --------------------------------*/
33/*--------------------------------------------------------------------------*/
34
35#ifndef __BMinQuad
36 #define __BMinQuad /* self-identification: #endif at the end of the file */
37
38/*--------------------------------------------------------------------------*/
39/*-------------------------------- MACROS ----------------------------------*/
40/*--------------------------------------------------------------------------*/
48/*------------------------------- LOG_BMQ ----------------------------------*/
72#define LOG_BMQ 0
73
74/*----------------------------- LAZY_D -------------------------------------*/
99#define LAZY_D 0
100
101/*------------------------------ TWOSIDED ---------------------------------*/
107#define TWOSIDED 1
108
109/*------------------------------ SIGNAL_XXCHG ------------------------------*/
120#define SIGNAL_MBCHG 0
121
122#define SIGNAL_B2CHG 0
123
124/*------------------------------ BEXACT ------------------------------------*/
129#define BEXACT 0
130
131/*----------------------------- CNDVD_TMP ----------------------------------*/
139#define CNDVD_TMP 1
140
142/*--------------------------------------------------------------------------*/
143/*------------------------------ INCLUDES ----------------------------------*/
144/*--------------------------------------------------------------------------*/
145
146#include "MinQuad.h"
147
148#if( LOG_BMQ )
149 #include <iostream>
150#endif
151
152/*--------------------------------------------------------------------------*/
153/*------------------------------ NAMESPACE ---------------------------------*/
154/*--------------------------------------------------------------------------*/
155
157{
158 using namespace OPTtypes_di_unipi_it;
159
160/*--------------------------------------------------------------------------*/
161/*---------------------------- CLASS BMinQuad ------------------------------*/
162/*--------------------------------------------------------------------------*/
163/*---------------------------- GENERAL NOTES -------------------------------*/
164/*--------------------------------------------------------------------------*/
212class BMinQuad : public MinQuad {
213
214/*--------------------------------------------------------------------------*/
215/*----------------------- PUBLIC PART OF THE CLASS -------------------------*/
216/*--------------------------------------------------------------------------*/
217/*-- --*/
218/*-- The following methods and data are the actual interface of the --*/
219/*-- class: the standard user should use these methods and data only. --*/
220/*-- --*/
221/*--------------------------------------------------------------------------*/
222
223 public:
224
225/*--------------------------------------------------------------------------*/
226/*--------------------------- PUBLIC METHODS -------------------------------*/
227/*--------------------------------------------------------------------------*/
228/*----------------------------- CONSTRUCTOR --------------------------------*/
229/*--------------------------------------------------------------------------*/
233 BMinQuad( void );
234
235/*--------------------------------------------------------------------------*/
236/*-------------------------- OTHER INITIALIZATIONS -------------------------*/
237/*--------------------------------------------------------------------------*/
241 void SetMaxDim( Index m , Index n , Index SDim );
242
243/*--------------------------------------------------------------------------*/
255 void SetEpsilonD( HpNum NeweD = 0 );
256
257/*--------------------------------------------------------------------------*/
267 void SetMaxVarAdd( cIndex MVA = 1 ) { MaxVarAdd = MVA; }
268
269/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
279 void SetMaxVarRmv( cIndex MVR = 1 ) { MaxVarRmv = MVR; }
280
281/*--------------------------------------------------------------------------*/
282
283#if( LOG_BMQ )
289 void SetBMQLog( ostream *log = 0 )
290 {
291 BMQLog = log;
292
293 #if( LOG_BMQ > 2 )
294 *BMQLog << "BMinQuad: " << SpaceDim << " variables." << endl << endl;
295 #endif
296 }
297
298#endif
299
300/*--------------------------------------------------------------------------*/
307 virtual void SetBMQTime( const bool TimeIt = true )
308 {
309 if( TimeIt )
310 if( BMQt )
311 BMQt->ReSet();
312 else
313 BMQt = new OPTtimers();
314 else {
315 delete BMQt;
316 BMQt = 0;
317 }
318 }
319
320/*--------------------------------------------------------------------------*/
321/*-------------- METHODS FOR ADDING / REMOVING / CHANGING DATA -------------*/
322/*--------------------------------------------------------------------------*/
323
324 void AddSubGrad( cIndex n , cHpNum alfan );
325
326 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
327
328 void AddConstr( cIndex n , cHpNum alfan );
329
330/*--------------------------------------------------------------------------*/
331
332 void ChangeAlfa( cIndex i , cHpNum DeltaAlfai )
333 {
334 if( DeltaAlfai ) {
335 RealAlfa[ i ] += DeltaAlfai;
336 MinQuad::ChangeAlfa( i , DeltaAlfai );
337 Bf = Inf< HpNum >(); // the objective function is allowed to increase
338 }
339 }
340
341/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
342
343 void ChangeAlfa( cHpNum DeltaAlfa );
344
345/*--------------------------------------------------------------------------*/
365 void MoveAlongD( cHpNum Tau , cHpNum DeltaFi );
366
367/*--------------------------------------------------------------------------*/
368
369 void ReadAlfa( HpRow NewAlfa );
370
371/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
372
373 cHpRow ReadAlfa( void ) { return( RealAlfa ); }
374
375/*--------------------------------------------------------------------------*/
376
377 void SetGTz( cIndex i , cHpNum GTzi );
378
379/*--------------------------------------------------------------------------*/
384 void SetD( Index i , LMNum Di ) { di[ i ] = Di; }
385
386/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
390 LMRow SetD( void ) { return( di ); }
391
392/*--------------------------------------------------------------------------*/
399 {
400 #if( TWOSIDED )
401 return( lb );
402 #else
403 return( bounds );
404 #endif
405 }
406
407/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
408 #if( TWOSIDED )
409
415 LMRow UpperBounds( void ) { return( ub ); }
416
417#endif
418
419/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
439 void ChangeBounds( void );
440
441/*--------------------------------------------------------------------------*/
509 void InitialSetUp( void );
510
511/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
513
514 char NNVar( void ) { return( 1 ); }
515
516/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
518
519 char IsVar( void ) { return( 2 ); }
520
521/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
523
524 char AcVar( void ) { return( 4 ); }
525
526/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
527
528#if( TWOSIDED )
530
531 char UBVar( void ) { return( 12 ); }
532
533#endif
534
535/*--------------------------------------------------------------------------*/
555 void AddVars( cIndex_Set whch , cIndex hwmny );
556
557/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
564 void AddVars( cIndex strt , cIndex hwmny );
565
566/*--------------------------------------------------------------------------*/
570 void RemoveVars( cIndex_Set whch , Index hwmny );
571
572
573/*--------------------------------------------------------------------------*/
582 void MoveVar( cIndex i , cIndex j , const bool iIsLst = true );
583
584/*--------------------------------------------------------------------------*/
613 void RenameVars( cIndex_Set whch );
614
615/*--------------------------------------------------------------------------*/
622
623/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
624/* Converts the constrained variable `i' into an unconstrained variable. It
625 * is uncorrect to call this method with an i not being the name of a
626 * declared variable. */
627
628 void MakeVarUnCnstr( cIndex i );
629
630/*--------------------------------------------------------------------------*/
631/*---------------------- METHODS FOR SOLVING THE PROBLEM -------------------*/
632/*--------------------------------------------------------------------------*/
647
648/*--------------------------------------------------------------------------*/
649
650#if( CNDVD_TMP )
658 void SettmpD( LMRow td ) { tmpdi = td; }
659
660 LMRow GettmpD( void ) { return( tmpdi ); }
661
662#endif
663
664/*--------------------------------------------------------------------------*/
665/*------------------------ METHODS FOR READING RESULTS ---------------------*/
666/*--------------------------------------------------------------------------*/
681 HpNum ReadzNorm( void ) { return( Quad + bNorm / ( PrvsTi * PrvsTi ) ); }
682
683/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
697 HpNum ReadSigma( const bool IncldCnst = true )
698 {
699 if( IncldCnst || ( ! ReadCBDim() ) )
700 return( Lin - bNorm / PrvsTi );
701 else {
702 HpNum tS = 0;
703 cHpRow tM = Mult;
704 cIndex_Set tB = Base;
705 for( Index h ; ( h = *(tB++) ) < Inf< Index >() ; tM++ )
706 if( ! IsAConst( h ) )
707 tS += (*tM) * RealAlfa[ h ];
708
709 return( tS );
710 }
711 }
712
713/*--------------------------------------------------------------------------*/
735 cLMRow ReadZ( void ) { return( di ); }
736
737/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
743 void ReadZ( LMRow z );
744
745/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
753 void ReadZSprs( LMRow z );
754
755/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
760
761/*--------------------------------------------------------------------------*/
774 void ReadD( LMRow d , cIndex CpyFrst = 0 );
775
776/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
781 void ReadDSprs( LMRow d );
782
783/*--------------------------------------------------------------------------*/
790 cIndex_Set ActiveVars( void ) { return( Base2 ); }
791
792/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
794
795 Index AVDim( void ) { return( B2Dim ); }
796
797/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
804 cIndex_Set InActiveVars( void ) { return( MBase2 ); }
805
806/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
808
809 Index IAVDim( void ) { return( MB2Dim ); }
810
811/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
822 char GetVar( cIndex i ) { return( GS[ i ] ); }
823
824/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
830 char * GetVars( void ) { return( GS ); }
831
832/*--------------------------------------------------------------------------*/
845
846/*--------------------------------------------------------------------------*/
857 void AddD( LMRow L1 , cLMRow L2 , cHpNum Tau );
858
859/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
867 void AddDSprs( LMRow L1 , cLMRow L2 , cHpNum Tau );
868
869/*--------------------------------------------------------------------------*/
878
879/*--------------------------------------------------------------------------*/
880
881 void SensitAnals1( HpNum &v1 , HpNum &v2 , HpNum &v3 );
882
883/*--------------------------------------------------------------------------*/
885
886 void BMQTime( double &t_us , double &t_ss )
887 {
888 t_us = t_ss = 0;
889 if( BMQt )
890 BMQt->Read( t_us , t_ss );
891 }
892
893/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
895
896 double BMQTime( void ) { return( BMQt ? BMQt->Read() : 0 ); }
897
898/*--------------------------------------------------------------------------*/
899/*-------------- METHODS FOR READING THE DATA OF THE PROBLEM ---------------*/
900/*--------------------------------------------------------------------------*/
902
903 HpNum EpsilonD( void ) { return( eD ); }
904
905
906/*----------------------------------------------------------------------------
907
908 IMPORTANT NOTE: the methods of the base class MinQuad
909
910 MinQuad::LowQ( i ) and MinQuad::LowQ( i , j )
911
912 may no more be reliable now to obtain the "full" scalar product
913 G[ i ] * G[ j ], since the matrix is modified during the course of the
914 algorithm; in fact, LowQ( i , j ) == GiTGj( i , j ) as defined above,
915 i.e., the scalar product calculated on a subset only (given by MBase2) of
916 the variables.
917
918----------------------------------------------------------------------------*/
919/*------------------------------ DESTRUCTOR --------------------------------*/
920/*--------------------------------------------------------------------------*/
922
923 virtual ~BMinQuad();
924
925/*--------------------------------------------------------------------------*/
926/*-------------------- PROTECTED PART OF THE CLASS -------------------------*/
927/*--------------------------------------------------------------------------*/
928
929 protected:
930
931/*--------------------------------------------------------------------------*/
932/*-------------------------- PURE VIRTUAL METHODS --------------------------*/
933/*--------------------------------------------------------------------------*/
934/*-- --*/
935/*-- The following methods are a part of the protected interface of the --*/
936/*-- class, but they *must* be implemented in the derived classes. --*/
937/*-- --*/
938/*--------------------------------------------------------------------------*/
995#if( LAZY_Q )
996
997 virtual QuNum GiTGj( cIndex i , cIndex j ) = 0;
998
999#else
1000
1001 virtual void GiTG( cIndex i , QuRow Qi , cIndex iMax ) = 0;
1002
1003#endif
1004
1005
1006/*--------------------------------------------------------------------------*/
1024 virtual cSgRow GiTilde( cIndex i ) = 0;
1025
1026/*--------------------------------------------------------------------------*/
1072#if( LAZY_D == 2 )
1073
1074 virtual LMNum CalculateZ( cIndex h ) = 0;
1075
1076#elif( LAZY_D == 1 )
1077
1078 virtual void CalculateZ( cIndex_Set Wh , LMRow z ) = 0;
1079
1080#else
1081
1082 virtual void CalculateZ( LMRow z ) = 0;
1083
1084#endif
1085
1086/*--------------------------------------------------------------------------*/
1109 virtual LMNum GiTLB( cIndex i , cLMRow l , cIndex_Set lB , cIndex lBd ) = 0;
1110
1111/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
1124 virtual void GiTLB( HpRow gtlb , cLMRow l , cIndex_Set lB , cIndex lBd ,
1125 const bool add ) = 0;
1126
1127/*--------------------------------------------------------------------------*/
1128/*---------------------- HOOKS FOR DERIVED CLASSES -------------------------*/
1129/*--------------------------------------------------------------------------*/
1130/*-- --*/
1131/*-- The following methods are called by the solver to give the user a --*/
1132/*-- better control over the optimization process. --*/
1133/*-- --*/
1134/*--------------------------------------------------------------------------*/
1135
1136#if( SIGNAL_MBCHG )
1138
1139 virtual void MBHasChgd( void ) = 0;
1140
1141#endif
1142
1143#if( SIGNAL_B2CHG )
1145
1146 virtual void B2HasChgd( void ) = 0;
1147
1148#endif
1149
1150/*--------------------------------------------------------------------------*/
1151/*------------------ "REAL" PROTECTED PART OF THE CLASS --------------------*/
1152/*--------------------------------------------------------------------------*/
1153/*-- --*/
1154/*-- The standard user should not care about the following part: users --*/
1155/*-- who need to extend the code by deriving a new class may use these --*/
1156/*-- methods and data structures. It is *dangerous* to *modify* the --*/
1157/*-- data structures, while it safe to read them. --*/
1158/*-- --*/
1159/*--------------------------------------------------------------------------*/
1160
1161/*--------------------------------------------------------------------------*/
1162/*-------------------------- PROTECTED METHODS -----------------------------*/
1163/*--------------------------------------------------------------------------*/
1168 void RecomputeRealAlfa( void );
1169
1170/*--------------------------------------------------------------------------*/
1171/*--------------------- PROTECTED DATA STRUCTURES --------------------------*/
1172/*--------------------------------------------------------------------------*/
1173
1177
1182
1186/*--------------------------------------------------------------------------*/
1187/*--------------------- PRIVATE PART OF THE CLASS --------------------------*/
1188/*--------------------------------------------------------------------------*/
1189/*-- --*/
1190/*-- Nobody should ever look at this part: everything that is under this --*/
1191/*-- advice may be changed without notice in any new release of the code. --*/
1192/*-- --*/
1193/*--------------------------------------------------------------------------*/
1194
1195 private:
1196
1197/*--------------------------------------------------------------------------*/
1198/*-------------------------- PRIVATE METHODS -------------------------------*/
1199/*--------------------------------------------------------------------------*/
1200
1201 void CalcOptDir( HpNum ti );
1202
1203/*--------------------------------------------------------------------------*/
1204
1205 void AddToB2( cIndex_Set MVD , cIndex MVDd );
1206
1207 void RmvFrmB2( cIndex_Set MVD , cIndex MVDd );
1208
1209 void AddToMB2( cIndex_Set MVD , cIndex MVDd );
1210
1211 void RmvFrmMB2( cIndex_Set MVD , cIndex MVDd );
1212
1213/*--------------------------------------------------------------------------*/
1214
1215 void CutOffConstrs( cIndex_Set MVD , Index MVDd );
1216
1217/*--------------------------------------------------------------------------*/
1218
1219 void PutInConstrs( cIndex_Set MVD , Index MVDd );
1220
1221/*--------------------------------------------------------------------------*/
1222
1223 void ClearTabooList( void );
1224
1225/*--------------------------------------------------------------------------*/
1226
1227 void MemDealloc( void );
1228
1229/*--------------------------------------------------------------------------*/
1230
1231 void CheckB2( void );
1232
1233 void CheckMB2( void );
1234
1235 void CheckGS( void );
1236
1237 void CheckRA( void );
1238
1239 void CheckDS( void );
1240
1241/*--------------------------------------------------------------------------*/
1242/*----------------------- PRIVATE DATA STRUCTURES -------------------------*/
1243/*--------------------------------------------------------------------------*/
1244
1245 HpNum eD; // Relative error for constraints violation tests
1246 HpNum Bf; // Objective function value
1247 HpNum bNorm; // Norm( bounds , Base2 , B2Dim );
1248
1249 Index MaxVarAdd; // How many variables at most can be added ..
1250 Index MaxVarRmv; // .. and removed from Base2[] at each iteration
1251
1252 Index TLDim; // total number of "taboo" items
1253 Index NNStop; // 1 + name of the last NN variable in the bundle
1254
1255 HpRow RealAlfa; // The "real" value of Alfa, while Alfa[ i ] contains
1256 // RealAlfa[ i ] - G[ i ]{Xsi} * l{Xsi} (or u{Xsi})
1257 // where {Xsi} is the set of the active box constr.
1258
1259 Index SpaceDim; // Max. number of variables
1260 char *GS; // Status of each variable
1261
1262 LMRow bounds; // The [active] bounds
1263 #if( TWOSIDED )
1264 LMRow lb; // Lower Bounds
1265 LMRow ub; // Upper Bounds
1266 #endif
1267
1268 LMRow di; // The current primal solution
1269 LMRow tmpdi; // Temporary for primal solution (with "exact" pricing)
1270
1271 #if( LOG_BMQ )
1272 std::ostream *BMQLog; // the output stream object
1273
1274 #if( LOG_BMQ > 1 )
1275 unsigned long int BCalls; // Calls counter
1276 unsigned long int BSccss; // Succesfull calls counter
1277 float SumAverages; // Sum{ all the steps i } B2Dim{i}
1278 #endif
1279 #endif
1280
1281 OPTtimers *BMQt;
1282
1283/*--------------------------------------------------------------------------*/
1284/*--------------------------------------------------------------------------*/
1285
1286 }; // end( class BMinQuad )
1287
1288/*--------------------------------------------------------------------------*/
1289
1290 } // end( namespace MinQuad_di_unipi_it )
1291
1292/*--------------------------------------------------------------------------*/
1293/*--------------------------------------------------------------------------*/
1294
1295#endif /* BMinQuad.h included */
1296
1297/*--------------------------------------------------------------------------*/
1298/*---------------------- End File BMinQuad.h -------------------------------*/
1299/*--------------------------------------------------------------------------*/
Definition BMinQuad.h:212
char UBVar(void)
mask for variables with uppper bound, used in InitialSetUp()
Definition BMinQuad.h:531
Index MB2Dim
Dimension of MBase2 ( <= SpaceDim - B2Dim )
Definition BMinQuad.h:1181
virtual void GiTG(cIndex i, QuRow Qi, cIndex iMax)=0
virtual cSgRow GiTilde(cIndex i)=0
virtual void SetBMQTime(const bool TimeIt=true)
Definition BMinQuad.h:307
char IsVar(void)
mask for existing variables, used in InitialSetUp()
Definition BMinQuad.h:519
void ChangeAlfa(cHpNum DeltaAlfa)
void ReadAlfa(HpRow NewAlfa)
void AddD(LMRow L1, cLMRow L2, cHpNum Tau)
char AcVar(void)
mask for active variables, used in InitialSetUp()
Definition BMinQuad.h:524
void MoveAlongD(cHpNum Tau, cHpNum DeltaFi)
void AddSubGrad(cIndex n, cHpNum alfan)
HpNum ReadSigma(const bool IncldCnst=true)
Definition BMinQuad.h:697
void ReadD(LMRow d, cIndex CpyFrst=0)
Index_Set Base2
Definition BMinQuad.h:1174
virtual void CalculateZ(LMRow z)=0
void SetGTz(cIndex i, cHpNum GTzi)
virtual LMNum GiTLB(cIndex i, cLMRow l, cIndex_Set lB, cIndex lBd)=0
void ChangeAlfa(cIndex i, cHpNum DeltaAlfai)
Definition BMinQuad.h:332
void SetMaxVarAdd(cIndex MVA=1)
Definition BMinQuad.h:267
void SetMaxVarRmv(cIndex MVR=1)
Definition BMinQuad.h:279
void SensitAnals1(HpNum &v1, HpNum &v2, HpNum &v3)
Index ReadVNames(Index_Set VNames)
LMRow SetD(void)
Definition BMinQuad.h:390
char * GetVars(void)
Definition BMinQuad.h:830
cLMRow ReadZ(void)
Definition BMinQuad.h:735
Index AVDim(void)
Returns the size of the set of "active" variables, see ActiveVars().
Definition BMinQuad.h:795
void MoveVar(cIndex i, cIndex j, const bool iIsLst=true)
void SettmpD(LMRow td)
Definition BMinQuad.h:658
void AddVars(cIndex_Set whch, cIndex hwmny)
void RemoveVars(cIndex_Set whch, Index hwmny)
Index_Set MBase2
Definition BMinQuad.h:1178
LMRow LowerBounds(void)
Definition BMinQuad.h:398
virtual ~BMinQuad()
Memory deallocation. Statistics (if any) are printed.
LMRow UpperBounds(void)
Definition BMinQuad.h:415
cIndex_Set ActiveVars(void)
Definition BMinQuad.h:790
void SetEpsilonD(HpNum NeweD=0)
virtual void GiTLB(HpRow gtlb, cLMRow l, cIndex_Set lB, cIndex lBd, const bool add)=0
char NNVar(void)
mask for variables with lower bound, used in InitialSetUp()
Definition BMinQuad.h:514
Index IAVDim(void)
Returns the size of the set of "inactive" variables, see InActiveVars().
Definition BMinQuad.h:809
char GetVar(cIndex i)
Definition BMinQuad.h:822
void AddVars(cIndex strt, cIndex hwmny)
Index B2Dim
Dimension of Base2.
Definition BMinQuad.h:1176
void BMQTime(double &t_us, double &t_ss)
Returns the user and sistem time in seconds spent so far by SolveQP()
Definition BMinQuad.h:886
cHpRow ReadAlfa(void)
Definition BMinQuad.h:373
void SetD(Index i, LMNum Di)
Definition BMinQuad.h:384
void AddConstr(cIndex n, cHpNum alfan)
void SetMaxDim(Index m, Index n, Index SDim)
void RenameVars(cIndex_Set whch)
double BMQTime(void)
Returns the total time in seconds spent so far by SolveQP()
Definition BMinQuad.h:896
Index_Set MvdVars
Definition BMinQuad.h:1183
cIndex_Set InActiveVars(void)
Definition BMinQuad.h:804
HpNum ReadzNorm(void)
Definition BMinQuad.h:681
void AddDSprs(LMRow L1, cLMRow L2, cHpNum Tau)
Definition MinQuad.h:188
Index_Set Base
Base (set of strictly positive variables)
Definition MinQuad.h:1101
virtual void ChangeAlfa(cIndex i, cHpNum DeltaAlfai)
Definition MinQuad.h:501
bool IsAConst(cIndex n)
Returns true if the item with "name" 'n' is a constraint.
Definition MinQuad.h:467
MQError
Definition MinQuad.h:209
Index ReadCBDim(void)
Definition MinQuad.h:853
HpNum PrvsTi
Value of ti in the latest call of CalcOptDir()
Definition MinQuad.h:1110
HpRow Mult
Primal variables.
Definition MinQuad.h:1100
HpNum Lin
Alfa^T * Mult.
Definition MinQuad.h:1104
HpNum Quad
Mult^T * Q * Mult.
Definition MinQuad.h:1103
Definition OPTUtils.h:144
void ReSet(void)
reset the timer
Definition OPTUtils.h:214
double Read(void)
Definition OPTUtils.h:184
HpNum * HpRow
"finer" (fp) array
Definition OPTtypes.h:99
const HpNum cHpNum
a read-only HpNum
Definition OPTtypes.h:102
double HpNum
"finer" floating point numbers
Definition OPTtypes.h:98
const Index cIndex
a read-only Index
Definition OPTtypes.h:64
cIndex * cIndex_Set
read-only array
Definition OPTtypes.h:65
Index * Index_Set
set (array) of indices
Definition OPTtypes.h:61
unsigned int Index
Index in a vector ( >= 0 )
Definition OPTtypes.h:60
cHpNum * cHpRow
read-only array
Definition OPTtypes.h:103
LMNum * LMRow
a vector of Lagrangean Multipliers
Definition OPTtypes.h:130
double LMNum
a Lagrangean Multiplier
Definition OPTtypes.h:129
cLMNum * cLMRow
a read-only vector of LMs
Definition OPTtypes.h:134
double QuNum
numbers in Q ( G{i}{T} * G{j} )
Definition OPTtypes.h:120
QuNum * QuRow
row of Q
Definition OPTtypes.h:121
cSgNum * cSgRow
a read-only subgradient
Definition OPTtypes.h:116
static constexpr T Inf(void) noexcept
Inf< T >() = infinity value for T.
Definition OPTUtils.h:357
Definition BMinQuad.h:157
Definition OPTtypes.h:41