Skip to content

dzibma/FuzzyMath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FuzzyMath

A lightweight library for fuzzy arithmetic.

Installation

Install via NuGet

License

The MIT License (MIT)

Usage

Fuzzy Number

The easiest way to create a fuzzy number is to use a FuzzyNumberFactory service. The constructor takes two optional arguments. The first one is a number of aplha-cuts, which the fuzzy numbers are made of. The second one is an epsilon to deal with floating points rounding errors.

var factory = new FuzzyNumberFactory(6);

FuzzyNumber A = factory.createTriangular(2, 3, 5, 7);
FuzzyNumber B = factory.createTrapezoidal(5, 8, 9);
FuzzyNumber C = factory.createCrisp(7);

Basic arithmetic

Operators +-*/ are overloaded, so you can use the fuzzy numbers created above as if they were doubles.

FuzzyNumber D = 2 * C - (2.5 + A / B);

Fuzzy numbers A, B, C

About

A lightweight library for fuzzy arithmetic

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages