예제 #1
0
void MSADistanceAlgorithm::fillTable() {
    int nSeq = ma->getNumRows();
    for (int i = 0; i < nSeq; i++) {
        for (int j = i; j < nSeq; j++) {
            if (isCanceled()) {
                return;
            }
            int sim = calculateSimilarity(i, j);
            lock.lock();
            setDistanceValue(i, j, sim);
            lock.unlock();
        }
    }
}
예제 #2
0
void SettingsPageTask::save()
{
  GeneralConfig *conf = GeneralConfig::instance();

  conf->setActiveTaskSwitchScheme( (GeneralConfig::ActiveTaskSwitchScheme) m_selectedSwitchScheme );
  conf->setReportTpSwitch( m_reportSwitch->isChecked() );
  conf->setTaskDrawShape( m_drawShape->isChecked() );
  conf->setTaskFillShape( m_fillShape->isChecked() );
  conf->setTaskShapeAlpha(m_transShape->value() );
  conf->setTaskPointAutoZoom( m_autoZoom->isChecked() );

  conf->setActiveTaskStartScheme( (GeneralConfig::ActiveTaskFigureScheme) m_selectedStartScheme );
  setDistanceValue( m_startLineValue, m_startLine );
  setDistanceValue( m_startRingValue, m_startRing );
  setDistanceValue( m_startSectorInnerRadiusValue, m_startSectorInnerRadius );
  setDistanceValue( m_startSectorOuterRadiusValue, m_startSectorOuterRadius );

  conf->setActiveTaskFinishScheme( (GeneralConfig::ActiveTaskFigureScheme) m_selectedFinishScheme );
  setDistanceValue( m_finishLineValue, m_finishLine );
  setDistanceValue( m_finishRingValue, m_finishRing );
  setDistanceValue( m_finishSectorInnerRadiusValue, m_finishSectorInnerRadius );
  setDistanceValue( m_finishSectorOuterRadiusValue, m_finishSectorOuterRadius );

  conf->setActiveTaskObsScheme( (GeneralConfig::ActiveTaskFigureScheme) m_selectedObsScheme );
  setDistanceValue( m_obsCircleRadiusValue, m_obsCircleRadius );
  setDistanceValue( m_obsSectorInnerRadiusValue, m_obsSectorInnerRadius );
  setDistanceValue( m_obsSectorOuterRadiusValue, m_obsSectorOuterRadius );

  conf->setTaskStartLineLength( m_startLineValue );
  conf->setTaskStartRingRadius( m_startRingValue  );
  conf->setTaskStartSectorIRadius( m_startSectorInnerRadiusValue );
  conf->setTaskStartSectorORadius( m_startSectorOuterRadiusValue );

  conf->setTaskFinishLineLength( m_finishLineValue );
  conf->setTaskFinishRingRadius( m_finishRingValue );
  conf->setTaskFinishSectorIRadius( m_finishSectorInnerRadiusValue );
  conf->setTaskFinishSectorORadius( m_finishSectorOuterRadiusValue );

  conf->setTaskObsCircleRadius( m_obsCircleRadiusValue );
  conf->setTaskObsSectorInnerRadius( m_obsSectorInnerRadiusValue );
  conf->setTaskObsSectorOuterRadius( m_obsSectorOuterRadiusValue );

  conf->setTaskStartSectorAngel( m_startSectorAngle->value() );
  conf->setTaskFinishSectorAngel( m_finishSectorAngle->value() );
  conf->setTaskObsSectorAngle( m_obsSectorAngle->value() );

  conf->save();
}