Exemplo n.º 1
0
 /// <summary>
 /// Creates a distribution using the probabilities from the given discrete distribution.
 /// </summary>
 /// <param name="d"></param>
 public static TThis FromDiscrete(Discrete d)
 {
     return(FromVector(d.GetWorkspace()));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Gets a Vector of size this.Dimension.
 /// </summary>
 /// <returns>A pointer to the internal probs Vector of the object.</returns>
 /// <remarks>
 /// This function is intended to be used with SetProbs, to avoid allocating a new Vector.
 /// The return value should not be interpreted as a probs vector, but only a workspace filled
 /// with unknown data that can be overwritten.  Until SetProbs is called, the distribution object
 /// is invalid once this workspace is modified.
 /// </remarks>
 public Vector GetWorkspace()
 {
     return(disc.GetWorkspace());
 }