public List<double> CalculateProductMasses(IEnumerable<ProductType> productTypes)
{
List<double> product_masses = new List<double>(2 * (Length - 1));
for(int r = 1; r < Length; r++)
{
foreach(ProductType product_type in productTypes)
{
if(!(product_type == ProductType.c && r < Length && this[r] == 'P') &&
!(product_type == ProductType.zdot && Length - r < Length && this[Length - r] == 'P'))
{
double product_mass = CalculateProductMass(product_type, r);
product_masses.Add(product_mass);
}
}
}
product_masses.Sort();
return product_masses;
}