Skip to content

Commit

Permalink
removed dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
AndySomogyi committed Aug 24, 2014
1 parent f5d87e4 commit d2c27a3
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 113 deletions.
1 change: 1 addition & 0 deletions apps/rr-sbml-benchmark/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <stdlib.h>

using namespace rr;
using namespace std;

// copasi test suite called like
// ./sbml-testsuite ~/src/sbml_test/cases/semantic 00221 ~/tmp/copasi 2 4
Expand Down
2 changes: 1 addition & 1 deletion examples/one_rr/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ int main(int argc, char** argv)
Log(lInfo)<<" ---------- SIMULATE ---------------------";

rr1.simulate();
Log(lInfo)<<"Data:"<<*(rr1.getSimulationResult());
Log(lInfo)<<"Data:"<<*(rr1.getSimulationData());
}
catch(const Exception& ex)
{
Expand Down
3 changes: 3 additions & 0 deletions source/llvm_testing/src/ConfigurableTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
#include "ConfigurableTest.h"
#include "rrRoadRunner.h"
#include <iostream>
#include <fstream>
#include <sstream>


using namespace std;

Expand Down
10 changes: 1 addition & 9 deletions source/rrRoadRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ string RoadRunner::getExtendedVersionInfo()



LibStructural* RoadRunner::getLibStruct()
ls::LibStructural* RoadRunner::getLibStruct()
{
Mutex::ScopedLock lock(roadRunnerMutex);

Expand Down Expand Up @@ -665,14 +665,6 @@ void RoadRunner::updateIntegrator()
}
}

RoadRunnerData *RoadRunner::getSimulationResult()
{
// set the data into the RoadRunnerData struct
populateResult();

return &impl->mRoadRunnerData;
}


double RoadRunner::getValue(const SelectionRecord& record)
{
Expand Down
14 changes: 6 additions & 8 deletions source/rrRoadRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "rrOSSpecifics.h"
#include "rr-libstruct/lsMatrix.h"
#include "rrSelectionRecord.h"
#include "rrRoadRunnerData.h"
#include "rrRoadRunnerOptions.h"
#include "Configurable.h"

Expand All @@ -25,6 +24,11 @@ class SBMLModelSimulation;
class ExecutableModel;
class Integrator;

using ls::Matrix;
using ls::DoubleMatrix;
using ls::Complex;
using ls::ComplexMatrix;

/**
* The main RoadRunner class.
*
Expand Down Expand Up @@ -163,12 +167,6 @@ class RR_DECLSPEC RoadRunner : public Configurable

#ifndef SWIG // deprecated methods not SWIG'ed

/**
* Use getSimulationData() instead.
* Also, can use the RoadRunnerData::RoadRunnerData(const RoadRunner*) ctor
*/
RR_DEPRECATED(rr::RoadRunnerData *getSimulationResult());

#endif

void setSimulateOptions(const SimulateOptions& settings);
Expand Down Expand Up @@ -834,7 +832,7 @@ class RR_DECLSPEC RoadRunner : public Configurable
/**
* the LibStruct is normally null, only created on demand here.
*/
LibStructural* getLibStruct();
ls::LibStructural* getLibStruct();

/**
* If the specified integrator does not exist, create it, and point the
Expand Down
89 changes: 0 additions & 89 deletions wrappers/C/rrc_cpp_support.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,96 +315,7 @@ RRList* createArrayList(const rrc::ArrayList& aList)
return theList;
}

//RRParameterHandle createParameter(const rr::BaseParameter& para)
//{
// if(para.getType() == "bool")
// {
// Parameter<bool> *thePara = dynamic_cast< Parameter<bool>* >(const_cast< BaseParameter* >(&para));
//
// RRParameter* aPara = new RRParameter;
// aPara->ParaType = ptBool;
// aPara->data.bValue = thePara->getValue();
// aPara->mName = rr::createText(thePara->getName());
// aPara->mHint = rr::createText(thePara->getHint());
// return aPara;
// }
//
// if(para.getType() == "integer")
// {
// Parameter<int> *thePara = dynamic_cast< Parameter<int>* >(const_cast< BaseParameter* >(&para));
//
// RRParameter* aPara = new RRParameter;
// aPara->ParaType = ptInteger;
// aPara->data.iValue = thePara->getValue();
// aPara->mName = rr::createText(thePara->getName());
// aPara->mHint = rr::createText(thePara->getHint());
// return aPara;
// }
//
// if(para.getType() == "double")
// {
// Parameter<double> *thePara = dynamic_cast< Parameter<double>* >(const_cast< BaseParameter* >(&para));
//
// RRParameter* aPara = new RRParameter;
// aPara->ParaType = ptInteger;
// aPara->data.iValue = thePara->getValue();
// aPara->mName = rr::createText(thePara->getName());
// aPara->mHint = rr::createText(thePara->getHint());
// return aPara;
// }
//
// if(para.getType() == "vector")
// {
// Parameter<RRVector*> *thePara = dynamic_cast< Parameter<RRVector*>* >(const_cast< BaseParameter* >(&para));
//
// RRParameter* aPara = new RRParameter;
// aPara->ParaType = ptVector;
// aPara->data.vValue = thePara->getValue();
// aPara->mName = rr::createText(thePara->getName());
// aPara->mHint = rr::createText(thePara->getHint());
// return aPara;
// }
// return NULL;
//}


RRCDataPtr createRRCData(const RoadRunnerData& result)
{
RRCData* rrCData = new RRCData;
memset(rrCData, 0, sizeof(RRCData));

rrCData->ColumnHeaders = new char*[result.cSize()];
for(int i = 0; i < result.cSize(); i++)
{
rrCData->ColumnHeaders[i] = rr::createText(result.getColumnNames()[i]);
}

rrCData->RSize = result.rSize();
rrCData->CSize = result.cSize();
int size = rrCData->RSize*rrCData->CSize;
rrCData->Data = new double[size];

if(result.hasWeights())
{
rrCData->Weights = new double[size];
}

int index = 0;
//The data layout is simple row after row, in one single long row...
for(int row = 0; row < rrCData->RSize; row++)
{
for(int col = 0; col < rrCData->CSize; col++)
{
rrCData->Data[index] = result(row, col);
if(result.hasWeights())
{
rrCData->Weights[index] = result.getWeight(row, col);
}
++index;
}
}
return rrCData;
}

RRCDataPtr createRRCData(const RoadRunner& tmp)
{
Expand Down
6 changes: 0 additions & 6 deletions wrappers/C/rrc_cpp_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,6 @@ C_DECL_SPEC RRStringArrayPtr createList(const rrc::StringList& lis
*/
C_DECL_SPEC RRListPtr createArrayList(const ArrayList& list);

/**
* @deprecated
*
* RoadRunnerData is going away.
*/
C_DECL_SPEC RRCDataPtr createRRCData(const rr::RoadRunnerData& data);

/**
* Creates an RRCDataPtr from the current state of a RoadRunner object.
Expand Down

0 comments on commit d2c27a3

Please sign in to comment.