public IVectorEvent GetVectorTypeLosses(long ContractID) { IVectorEvent output; transformer = new GULossTransformer(mappers[ContractID]); if (lossType == GULossType.Dictionary) { output = transformer.DictToVector(drLossDict); } else if (lossType == GULossType.Vector) { output = drLossEvent; } else { throw new NotSupportedException(); } if (convertToGU) { ConvertToGU(output.LossVector, mappers[ContractID]); //convertToGU = false; } FilterGULoss(output, ContractID); return(output); }
public Dictionary <string, Dictionary <int, Dictionary <long, Tuple <double, uint, List <float> > > > > GetDictTypeLosses(long ContractID) { Dictionary <string, Dictionary <int, Dictionary <long, Tuple <double, uint, List <float> > > > > output; transformer = new GULossTransformer(mappers[ContractID]); if (lossType == GULossType.Dictionary) { output = drLossDict; } else if (lossType == GULossType.Vector) { output = transformer.VectorToDict(drLossEvent); } else { throw new NotSupportedException(); } if (convertToGU) { ConvertToGU(output, mappers[ContractID]); //convertToGU = false; } return(output); }
public IVectorEvent GenerateRITELoss(int eventID) { Dictionary <string, Dictionary <int, Dictionary <long, Tuple <double, uint, List <float> > > > > IntialGULoss; if (GUgenerator.GenerateRITELoss(eventID)) { IntialGULoss = GUgenerator.GULosses; } else { throw new InvalidOperationException("Cannot get ground-up loss for event: " + eventID); } GULossTransformer transformer = new GULossTransformer(indexMapper); IVectorEvent VectorGU = transformer.DictToVector(IntialGULoss); return(VectorGU); }