Click here to Skip to main content
15,879,326 members
Articles / Artificial Intelligence

C++ Fuzzy Logic API + Simple DSL

Rate me:
Please Sign up or sign in to vote.
4.59/5 (11 votes)
18 Jan 2012CPOL8 min read 55.8K   1.7K   35  
Fuzzy Logic API and Fuzzy Logic DSL implemented with C++.
#pragma once

#include <stdlib.h>
#include <sstream>
#include <vector>
using namespace std;

/*
* Author: Sa�o Ma�ari�
*/
namespace FuzzyLogic{
	//Class used for input data
	class CFuzzyInput
	{
		//Variable name
		string variableName;
		//Input value for fuzzy system
		double inputValue;
	public:

		CFuzzyInput(string nVariableName, double nInputValue)
		{
			variableName = nVariableName;
			inputValue = nInputValue;
		}

		~CFuzzyInput(void)
		{
		}

		//Setters
		void SetInputValue(double newVal){inputValue = newVal;}
		//Getters
		string GetVariableName(){return variableName;}
		double GetInputValue(){return inputValue;}
	};
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Team Leader
Slovenia Slovenia
Hey, if you like my content fell more than welcome to contact me on LinkedIn or send me an email to saso.madaric@gmail.com

http://www.linkedin.com/pub/saso-madaric/72/372/b1a

Passionate Team Leader with purpose to keep his team happy and Senior Java Developer who started his first professional software development job at age 20. An enthusiastic believer that technical knowledge is not enough for successfully delivered project - without understanding business domain in detail, project quickly becomes unsuccessful.

Comments and Discussions