Exemplo n.º 1
0
int main(int argc, char *argv[])
{
	if (argc!=2) {
		usage();
		return EXIT_FAILURE;
	} else if (strcmp(argv[1],"-v")==0) {
    std::cout << "ghsom: Version " << VERSION << std::endl;
	} else {
  	getProps(argv[1]);
		startIt();
	}

  return EXIT_SUCCESS;
}
Exemplo n.º 2
0
    void ParametersInterpreter<NMSmodelT>::setSubjectParameters(const std::vector<double>& x) {


        unsigned count = 0;
        for (typename ParametersMap::const_iterator it(parameters_.begin()); it != parameters_.end(); ++it) {

            unsigned noCoefficients = it->second.size;
            std::vector<double>::const_iterator startIt(x.begin() + count);
            std::vector<double>::const_iterator endIt(x.begin() + count + noCoefficients);
            std::vector<double> groupedCoefficients(startIt, endIt);
            std::vector<double> coefficients;

            getCoefficients(it->first, coefficients);
            distributeValues(it->second.muscleGroups, coefficients, groupedCoefficients);
            setCoefficients(it->first, coefficients);

            count += noCoefficients;

        }

    }
Exemplo n.º 3
0
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow),
    m_audioOutput(0),
    m_morse(0)

{
    ui->setupUi(this);
#ifdef SMALL_DEVICE
    resize(800,440);
#else
    resize(1000,600);
#endif

    setWindowIcon(QIcon(":/icons/64x64/cutecw.png"));

    createAudioOutput();

    m_morse = new Morse(this, m_audioOutput, ui);

    this->setFocus();

    startIt();
}