예제 #1
0
파일: Model.cs 프로젝트: langeds/aima
		public bool isFalse(Symbol symbol) 
		{
			Object status = h[symbol.getValue()];
			if (status != null) 
			{
				return !((bool) status);
			}
			return false;
		}
예제 #2
0
파일: Model.cs 프로젝트: langeds/aima
		public bool isTrue(Symbol symbol) 
		{
			Object status = h[symbol.getValue()];
			if (status != null) 
			{
				return ((Boolean) status);
			}
			return false;
		}
예제 #3
0
파일: Model.cs 프로젝트: langeds/aima
		public bool getStatus(Symbol symbol) 
		{
			Object status = h[symbol.getValue()];
			if (status != null) 
			{
				return (bool) status;
			}
			return false;//TODO: is this right?  it was null in the java source
		}
예제 #4
0
		public override Object visitSymbol(Symbol s, Object arg) 
		{
			Hashtable symbolsCollectedSoFar = (Hashtable)arg;
			symbolsCollectedSoFar.Add(new Symbol(s.getValue()),null);
			return symbolsCollectedSoFar;
		}
예제 #5
0
		public virtual Object visitSymbol(Symbol s, Object arg) 
		{
			return arg;
		}
예제 #6
0
파일: Model.cs 프로젝트: langeds/aima
		public Model extend(Symbol symbol, bool b) 
		{
			Model m = new Model();
			return extend(symbol.getValue(),b);
		}
예제 #7
0
파일: Model.cs 프로젝트: langeds/aima
		private bool isUnknown(Symbol s) 
		{
			Object o = h[s.getValue()];
			return (o == null);

		}
예제 #8
0
파일: Model.cs 프로젝트: langeds/aima
		public Hashtable getAssignedSymbols() 
		{
			Hashtable _set= new Hashtable();
			//Iterator i = this.h.keySet().iterator();
			//while (i.hasNext()) 
			foreach (string i in this.h.Keys)
			{
				Symbol key = new Symbol(i);
				if (!(isUnknown(key)))
				{
					_set.Add(key,null);
				}
			}
			return _set;
		}
예제 #9
0
파일: Model.cs 프로젝트: langeds/aima
		// VISITOR METHODS
		public Object visitSymbol(Symbol s, Object arg) 
		{
			return getStatus(s);
		}
예제 #10
0
파일: Model.cs 프로젝트: langeds/aima
		public Model flip(Symbol s) 
		{
			if (isTrue(s)) 
			{
				return extend(s, false);
			}
			if (isFalse(s)) 
			{
				return extend(s, true);
			}
			return this;
		}