SoPlex
Toggle main menu visibility
Loading...
Searching...
No Matches
src
soplex
spxsumst.h
Go to the documentation of this file.
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2
/* */
3
/* This file is part of the class library */
4
/* SoPlex --- the Sequential object-oriented simPlex. */
5
/* */
6
/* Copyright (c) 1996-2026 Zuse Institute Berlin (ZIB) */
7
/* */
8
/* Licensed under the Apache License, Version 2.0 (the "License"); */
9
/* you may not use this file except in compliance with the License. */
10
/* You may obtain a copy of the License at */
11
/* */
12
/* http://www.apache.org/licenses/LICENSE-2.0 */
13
/* */
14
/* Unless required by applicable law or agreed to in writing, software */
15
/* distributed under the License is distributed on an "AS IS" BASIS, */
16
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17
/* See the License for the specific language governing permissions and */
18
/* limitations under the License. */
19
/* */
20
/* You should have received a copy of the Apache-2.0 license */
21
/* along with SoPlex; see the file LICENSE. If not email to soplex@zib.de. */
22
/* */
23
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25
26
/**@file spxsumst.h
27
* @brief Simple heuristic SPxStarter.
28
*/
29
#ifndef _SPXSUMST_H_
30
#define _SPXSUMST_H_
31
32
33
#include <assert.h>
34
35
#include "
soplex/spxvectorst.h
"
36
37
namespace
soplex
38
{
39
40
/**@brief Simple heuristic SPxStarter.
41
@ingroup Algo
42
43
Testing version of an SPxVectorST using a very simplistic heuristic to
44
build up an approximated solution vector.
45
*/
46
template
<
class
R>
47
class
SPxSumST
:
public
SPxVectorST
<R>
48
{
49
protected
:
50
51
//-------------------------------------
52
/**@name Protected helpers */
53
///@{
54
/// sets up variable weights.
55
void
setupWeights
(
SPxSolverBase<R>
& base);
56
///@}
57
58
public
:
59
60
//-------------------------------------
61
/**@name Construction / destruction */
62
///@{
63
/// default constructor.
64
SPxSumST
()
65
{
66
this->
m_name
=
"Sum"
;
67
}
68
/// copy constructor
69
SPxSumST
(
const
SPxSumST
& old)
70
:
SPxVectorST
<R>(old)
71
{
72
assert(this->
isConsistent
());
73
}
74
/// assignment operator
75
SPxSumST
&
operator=
(
const
SPxSumST
& rhs)
76
{
77
if
(
this
!= &rhs)
78
{
79
SPxVectorST<R>::operator=
(rhs);
80
81
assert(this->
isConsistent
());
82
}
83
84
return
*
this
;
85
}
86
/// destructor.
87
virtual
~SPxSumST
()
88
{}
89
/// clone function for polymorphism
90
inline
virtual
SPxStarter<R>
*
clone
()
const
91
{
92
return
new
SPxSumST
(*
this
);
93
}
94
///@}
95
96
};
97
98
}
// namespace soplex
99
100
#include "spxsumst.hpp"
101
#endif
// _SPXSUMST_H_
soplex::SPxSolverBase
Sequential object-oriented SimPlex.
Definition
spxsolver.h:104
soplex::SPxStarter
SoPlex start basis generation base class.
Definition
spxstarter.h:52
soplex::SPxStarter::m_name
const char * m_name
name of the starter
Definition
spxstarter.h:59
soplex::SPxSumST::~SPxSumST
virtual ~SPxSumST()
destructor.
Definition
spxsumst.h:87
soplex::SPxSumST::setupWeights
void setupWeights(SPxSolverBase< R > &base)
sets up variable weights.
soplex::SPxSumST::clone
virtual SPxStarter< R > * clone() const
clone function for polymorphism
Definition
spxsumst.h:90
soplex::SPxSumST::operator=
SPxSumST & operator=(const SPxSumST &rhs)
assignment operator
Definition
spxsumst.h:75
soplex::SPxSumST::SPxSumST
SPxSumST(const SPxSumST &old)
copy constructor
Definition
spxsumst.h:69
soplex::SPxSumST::SPxSumST
SPxSumST()
default constructor.
Definition
spxsumst.h:64
soplex::SPxVectorST::SPxVectorST
SPxVectorST()
default constructor.
Definition
spxvectorst.h:87
soplex::SPxVectorST::operator=
SPxVectorST & operator=(const SPxVectorST &rhs)
assignment operator
Definition
spxvectorst.h:101
soplex::SPxWeightST::isConsistent
virtual bool isConsistent() const
consistency check.
soplex
Everything should be within this namespace.
spxvectorst.h
Solution vector based start basis.
Generated by
1.17.0