IEnumerator CreateOperators(GenericDatamodel data)
        {
            //wait for the next frame
            yield return(0);

            GameObject obj = _observer.CreateOperator(_observer.GetOperatorPrefabs()[_parentIndex], _parents);

            obj.GetComponent <GenericOperator>().SetRawInputData(data);
            StartCoroutine(SetPosition());
        }
Esempio n. 2
0
    public GenericDatamodel MergeDatamodels(GenericDatamodel datamodeltomerge)
    {
        if (datamodeltomerge == null)
        {
            return(this);
        }

        if (datamodeltomerge.GetType() != GetType())
        {
            throw new Exception("Cannot merge two different DataTypeModels");
        }

        DataItems.AddRange(datamodeltomerge.GetDataItems());

        return(this);
    }
Esempio n. 3
0
        /**
         * Reprocesses the data, parsing the updated data from the parent node to its children recursively
         * */
        public void ReProcess(GenericDatamodel datamodel)
        {
            if (!GetType().Equals(typeof(DataloaderOperator)) || !GetType().Equals(typeof(DatageneratorOperator)))
            {
                SetRawInputData(datamodel);
            }
            Process();

            //it is necessary not to call SplitdatasetOperator, because it's children Reprocess function is already called within
            //calling it twice, overwrites the data

            if (GetType() != typeof(SplitDatasetOperator))
            {
                foreach (var child in Children)
                {
                    child.ReProcess(GetOutputData());
                }
            }
        }
Esempio n. 4
0
 /**
  * Sets the outputData
  * */
 public void SetOutputData(GenericDatamodel newOuputData)
 {
     hasOutput   = (newOuputData != null);
     _outputData = newOuputData;
 }
Esempio n. 5
0
 /**
  * Sets the inputData
  * */
 public void SetRawInputData(GenericDatamodel newRawInputData)
 {
     hasInput      = (newRawInputData != null);
     _rawInputData = newRawInputData;
 }