File: octave_support.cpp

package info (click to toggle)
mpsolve 3.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,100 kB
  • sloc: ansic: 25,748; sh: 4,925; cpp: 3,155; makefile: 914; python: 407; yacc: 158; lex: 85; xml: 41
file content (21 lines) | stat: -rw-r--r-- 496 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "octave_support.h"

using namespace mpsolve::octave; 

std::set<std::string> Algorithms::m_supportedAlgs;
bool Algorithms::m_initPerformed = false; 

void
Algorithms::initSupportedAlgs () {
  if (! m_initPerformed) {
    m_initPerformed = true; 
    m_supportedAlgs.insert (std::string("s")); 
    m_supportedAlgs.insert (std::string("h")); 
  }
}

bool
Algorithms::isSupported (std::string alg) {
  initSupportedAlgs (); 
  return m_supportedAlgs.find(alg) != m_supportedAlgs.end(); 
}