예제 #1
0
 public ICollection <Literal> getTail()
 {
     if (0 == literals.Size())
     {
         return(_emptyLiteralsList);
     }
     return(CollectionFactory.CreateReadOnlyQueue <Literal>(literals.subList(1, literals.Size())));
 }
예제 #2
0
            public ICollection <IAction> apply(VacuumEnvironmentState state)
            {
                ICollection <IAction> actions = CollectionFactory.CreateQueue <IAction>();

                actions.Add(VacuumEnvironment.ACTION_SUCK);
                actions.Add(VacuumEnvironment.ACTION_MOVE_LEFT);
                actions.Add(VacuumEnvironment.ACTION_MOVE_RIGHT);
                // Ensure cannot be modified.
                return(CollectionFactory.CreateReadOnlyQueue <IAction>(actions));
            }
예제 #3
0
        ICollection <FOLNode> FOLNode.getArgs()
        {
            ICollection <FOLNode> obj = CollectionFactory.CreateQueue <FOLNode>();

            foreach (Sentence sentence in args)
            {
                obj.Add(sentence);
            }

            return(CollectionFactory.CreateReadOnlyQueue <FOLNode>(obj));
        }
예제 #4
0
        ICollection <FOLNode> FOLNode.getArgs()
        {
            ICollection <FOLNode> obj = CollectionFactory.CreateQueue <FOLNode>();

            foreach (Term term in getTerms())
            {
                obj.Add(term);
            }

            return(CollectionFactory.CreateReadOnlyQueue <FOLNode>(obj));
        }
예제 #5
0
 public BayesNet(params INode[] rootNodes)
 {
     if (null == rootNodes)
     {
         throw new IllegalArgumentException("Root Nodes need to be specified.");
     }
     foreach (INode n in rootNodes)
     {
         this.rootNodes.Add(n);
     }
     if (this.rootNodes.Size() != rootNodes.Length)
     {
         throw new IllegalArgumentException("Duplicate Root Nodes Passed in.");
     }
     // Ensure is a DAG
     checkIsDAGAndCollectVariablesInTopologicalOrder();
     variables = CollectionFactory.CreateReadOnlyQueue <IRandomVariable>(variables);
 }
예제 #6
0
 public ICollection <Term> getTerms()
 {
     return(CollectionFactory.CreateReadOnlyQueue <Term>(terms));
 }
예제 #7
0
 public ICollection <Sentence> getArgs()
 {
     return(CollectionFactory.CreateReadOnlyQueue <Sentence>(args));
 }
예제 #8
0
 public ICollection <FOLNode> getArgs()
 {
     return(CollectionFactory.CreateReadOnlyQueue <FOLNode>(args));
 }
예제 #9
0
 public ICollection <Variable> getVariables()
 {
     return(CollectionFactory.CreateReadOnlyQueue <Variable>(variables));
 }
예제 #10
0
 public virtual ICollection <IEnvironmentObject> GetEnvironmentObjects()
 {
     // Return as a List but also ensures the caller cannot modify
     return(CollectionFactory.CreateReadOnlyQueue <IEnvironmentObject>(envObjects));
 }
예제 #11
0
파일: CNF.cs 프로젝트: tvn-cosine/aima.net
 public ICollection <Clause> getConjunctionOfClauses()
 {
     return(CollectionFactory.CreateReadOnlyQueue <Clause>(conjunctionOfClauses));
 }
예제 #12
0
 public ICollection <Literal> getLiterals()
 {
     return(CollectionFactory.CreateReadOnlyQueue <Literal>(literals));
 }
예제 #13
0
 public ICollection <Clause> getAllDefiniteClauseImplications()
 {
     return(CollectionFactory.CreateReadOnlyQueue <Clause>(implicationDefiniteClauses));
 }
예제 #14
0
 public ICollection <Sentence> getOriginalSentences()
 {
     return(CollectionFactory.CreateReadOnlyQueue <Sentence>(originalSentences));
 }
예제 #15
0
        private int descendants; // for debugging!

        /**
         * Construct an individual using the provided representation.
         *
         * @param representation
         *            the individual's representation.
         */
        public Individual(ICollection <A> representation)
        {
            this.representation = CollectionFactory.CreateReadOnlyQueue <A>(representation);
        }
예제 #16
0
 public override ICollection <ProofStep> getPredecessorSteps()
 {
     return(CollectionFactory.CreateReadOnlyQueue <ProofStep>(predecessors));
 }
예제 #17
0
 public virtual ICollection <IAgent> GetAgents()
 {
     // Return as a List but also ensures the caller cannot modify
     return(CollectionFactory.CreateReadOnlyQueue <IAgent>(agents));
 }