예제 #1
0
        /// <summary>
        /// fully set arff instance, used by ArffLoader
        /// </summary>
        /// <param name="headers"></param>
        /// <param name="datasets"></param>
        /// <param name="skipIntCheck"></param>
        public ArffInstance(Library headers, Library datasets, bool skipIntCheck = false) : this()
        {
            if (headers == null || datasets == null)
            {
                throw new CekaException("can not pass null for library values of an ArffInstance");
            }

            this.Headers  = headers;
            this.Datasets = datasets;

            Headers.CleanUp();
            Datasets.CleanUp();

            this.Relation = Headers.getRelationName(); //grab name out of it
            Headers.removeRelation();                  //and delete it afterwards, we dont need it, as we want clean Libraries

            //running the int-check
            if (!skipIntCheck)
            {
                this.integrityCheck();
            }
        }