Combine() public static method

Combines the given v.
Thrown when the requested operation is invalid.
public static Combine ( ) : Vector
return Vector
Example #1
0
 /// <summary>A Vector extension method that expands.</summary>
 /// <param name="source">The source to act on.</param>
 /// <param name="s">The Vector to process.</param>
 /// <returns>A Vector.</returns>
 public static Vector Expand(this Vector source, Vector s)
 {
     return(Vector.Combine(source, s));
 }
Example #2
0
 /// <summary>
 /// Unshapes the given Matrix into a Vector form along the <paramref name="dimensionType"/> axis.
 /// <para>Reads from the source Matrix and stacks from right to left when <paramref name="dimensionType"/> equals 'Col' otherwise uses a bottom up approach.</para>
 /// </summary>
 /// <param name="m">The Matrix to act on.</param>
 /// <param name="dimensionType">Type of the dimension to use when unrolling the Matrix.</param>
 /// <returns>Matrix.</returns>
 public static Vector Unshape(Matrix m, VectorType dimensionType = VectorType.Col)
 {
     return(Vector.Combine((dimensionType == VectorType.Col ? m.GetCols().ToArray() : m.GetRows().ToArray())));
 }
Example #3
0
 /// <summary>A Vector extension method that expands.</summary>
 /// <param name="source">The source to act on.</param>
 /// <param name="n">The int to process.</param>
 /// <returns>A Vector.</returns>
 public static Vector Expand(this Vector source, int n)
 {
     return(Vector.Combine(source, new Vector(n)));
 }