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()); }
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); }
/** * 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()); } } }
/** * Sets the outputData * */ public void SetOutputData(GenericDatamodel newOuputData) { hasOutput = (newOuputData != null); _outputData = newOuputData; }
/** * Sets the inputData * */ public void SetRawInputData(GenericDatamodel newRawInputData) { hasInput = (newRawInputData != null); _rawInputData = newRawInputData; }