예제 #1
0
		public Hashtable getSymbolsIn(Sentence s)
		{
			if (s == null)
			{//empty knowledge bases  == null fix this later
				return new Hashtable();
			}
			object o = s.accept(this,new Hashtable());
			Hashtable h = (Hashtable)o;
			return (Hashtable)s.accept(this, new Hashtable());
		}
예제 #2
0
파일: Model.cs 프로젝트: langeds/aima
		//		public void print() 
		//		{
		//			Iterator i = h.keySet().iterator();
		//			while (i.hasNext()) 
		//			{
		//				Object key = i.next();
		//				Object value = h.get(key);
		//				System.out.print(key + " = " + value + " ");
		//				//System.out.print (key +" = " +((Boolean)value).booleanValue());
		//			}
		//			System.out.println();
		//		}

		public bool isTrue(Sentence clause) 
		{		
			Object result = clause.accept(this,null);
			return (result == null) ? false : ((bool) result)==true;
		}
예제 #3
0
파일: Model.cs 프로젝트: langeds/aima
		public bool isFalse(Sentence clause) 
		{		
			Object o = clause.accept(this,null);
			return (o != null) ? ((bool) o)==false : false;
		}
예제 #4
0
파일: Model.cs 프로젝트: langeds/aima
		public bool isUnknown(Sentence clause) 
		{		//TODO TEST WELL
			Object o = clause.accept(this,null);
			return (o == null) ;
		}