Exemple #1
0
		public bool IsInSet( FuzzyNumber number )
		{
			for( int i=0; i<this.Count; i++ )
			{
				if( ( ( FuzzyNumber )this.FuzzyArray[ i ] ).IsEqual( number ) == true )
					return true;
			}

			return false;
		}
Exemple #2
0
		public static FuzzyNumber operator -( FuzzyNumber num, FuzzyNumber number )
		{
			FuzzyNumber fuzzTemp = new FuzzyNumber( num.Number - number.Number, num.Minimum, num.Maximum );
			fuzzTemp.SetMembership();
			return fuzzTemp;
		}
Exemple #3
0
		public static FuzzyNumber operator %( FuzzyNumber num, FuzzyNumber number )
		{
			FuzzyNumber fuzzTemp;
			if( num.Number == 0.0 || number.Number == 0.0 )
			{
				fuzzTemp = new FuzzyNumber( num.Number, num.Minimum, num.Maximum );
				fuzzTemp.SetMembership();
				return fuzzTemp;
			}

			fuzzTemp = new FuzzyNumber( num.Number % number.Number, num.Minimum, num.Maximum );
			fuzzTemp.SetMembership();
			return fuzzTemp;
		}
Exemple #4
0
		/// <summary>
		/// Check if the set values are equal name and id not checked as 
		/// these are arbitrary
		/// </summary>
		/// <param name="number"></param>
		/// <returns></returns>
		public bool IsEqual( FuzzyNumber number )
		{
			if( number.Maximum == this.Maximum &&
				number.Membership == this.Membership &&
				number.Minimum == this.Minimum && 
				number.Number == this.Number )
			{
				return true;
			}

			return false;
		}
Exemple #5
0
		/// <summary>
		/// constructor that takes the values for the first fuzzy number
		/// </summary>
		/// <param name="number"></param>
		/// <param name="minimum"></param>
		/// <param name="maximum"></param>
		public FuzzyNumberSet( double number, double minimum, double maximum ) : base()
		{
			FuzzyNumber temp = new FuzzyNumber( number, minimum, maximum );
			FuzzyArray.Add( temp );
		}
Exemple #6
0
		/// <summary>
		/// constructor that takes the first fuzzy number
		/// </summary>
		/// <param name="fuzzyNum"></param>
		public FuzzyNumberSet( FuzzyNumber fuzzyNum ) : base()
		{
			FuzzyArray.Add( fuzzyNum );
		}
Exemple #7
0
		/// <summary>
		///  conbstructor that creates a number of empty fuzzy numbers
		/// </summary>
		/// <param name="nNumberCount"></param>
		public FuzzyNumberSet( int nNumberCount ) : base()
		{

			for( int i=0; i<nNumberCount; i++ )
			{
				FuzzyNumber temp = new FuzzyNumber();
				FuzzyArray.Add( temp );
			}
		}
Exemple #8
0
		public FuzzyNumber( FuzzyNumber fuzzy )
		{
			this.ID = fuzzy.ID;
			this.Maximum = fuzzy.Maximum;
			this.Membership = fuzzy.Membership;
			this.Minimum = fuzzy.Minimum;
			this.Name = fuzzy.Name;
			this.Number = fuzzy.Number;
		}