home › Forums › # Technical Support › Importing fll,fcl,fis › Reply To: Importing fll,fcl,fis
January 3, 2015 at 01:34
#1592
Member
OK I did some forum search.
This seams like the solution.
#include <fl/Headers.h>
int main(int argc, char** argv){
std::string fisEngine = readFromSomeFile("xxx.fis");
std::vector<std::vector<fl::scalar> > inputs = readFromSomeFileAndParse("xxx.dat");
fl::Engine* engine = FisImporter().fromString(fisEngine);
for (std::size_t i = 0 ; i < inputs.size(); ++i){
for (std::size_t x = 0 ; x < inputs.at(i).size(); ++x){
engine->getInputVariable(x)->setInputValue(inputs.at(i).at(x));
}
engine->process();
for (int i = 0 ; i < engine->numberOfOutputVariables(); ++i){
fl::scalar output = engine->getOutputVariable(i)->defuzzify();
writeToSomeFile(output + " ");
}
writeToSomeFile(output + "\n");
}
But I still didn’t found the API Doc 🙂
br haluk