public PrositIntensityOutput(MapField <string, TensorProto> prositOutput) { var outputTensor = prositOutput[OUTPUT_KEY]; // Note that this is essentially a lightweight iterator. We pass // down an index by reference that keeps getting increased. var precursorCount = outputTensor.TensorShape.Dim[0].Size; OutputRows = new PrositPrecursorOutput[precursorCount]; var index = 0; // Copy intensities for each precursor for (var i = 0; i < precursorCount; ++i) { OutputRows[i] = new PrositPrecursorOutput(outputTensor, ref index); } }
public PrositIntensityOutput() { OutputRows = new PrositPrecursorOutput[0]; }