Пример #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
 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));
 }