/// <summary> /// Fills all cells of the given vectors into the given histogram. /// </summary> /// <param name="histo"></param> /// <param name="x"></param> /// <param name="y"></param> /// <param name="z"></param> /// <param name="weights"></param> /// <returns><i>histo</i> (for convenience only).</returns> /// <exception cref="ArgumentException">if <i>x.Count != y.Count || x.Count != z.Count || x.Count != weights.Count</i>.</exception> public static Hep.Aida.IHistogram3D Histogram(Hep.Aida.IHistogram3D histo, DoubleMatrix1D x, DoubleMatrix1D y, DoubleMatrix1D z, DoubleMatrix1D weights) { if (x.Size != y.Size || x.Size != z.Size || x.Size != weights.Size) { throw new ArgumentException("vectors must have same size"); } for (int i = x.Size; --i >= 0;) { histo.Fill(x[i], y[i], z[i], weights[i]); } return(histo); }
/// <summary> /// Fills all cells of the given vectors into the given histogram. /// </summary> /// <param name="histo"></param> /// <param name="x"></param> /// <param name="y"></param> /// <param name="z"></param> /// <param name="weights"></param> /// <returns><i>histo</i> (for convenience only).</returns> /// <exception cref="ArgumentException">if <i>x.Count != y.Count || x.Count != z.Count || x.Count != weights.Count</i>.</exception> public static Hep.Aida.IHistogram3D Histogram(Hep.Aida.IHistogram3D histo, DoubleMatrix1D x, DoubleMatrix1D y, DoubleMatrix1D z, DoubleMatrix1D weights) { if (x.Size != y.Size || x.Size != z.Size || x.Size != weights.Size) { throw new ArgumentException(Cern.LocalizedResources.Instance().Matrix_VectorsMustHaveSameSize); } for (int i = x.Size; --i >= 0;) { histo.Fill(x[i], y[i], z[i], weights[i]); } return(histo); }