Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Fill.cs
1namespace IdApp.Cv.Basic
2{
6 public static partial class BasicOperations
7 {
14 public static void Fill<T>(this Matrix<T> M, T Value)
15 where T : struct
16 {
17 int y, h = M.Height;
18 int x, w = M.Width;
19 int Index = M.Start;
20 int Skip = M.Skip;
21 T[] Data = M.Data;
22
23 for (y = 0; y < h; y++, Index += Skip)
24 {
25 for (x = 0; x < w; x++) // TODO: For wide rows, this can be optimized using Array.Copy().
26 Data[Index++] = Value; // TODO: .NET Standard 2.1 also contains Array.Fill.
27 }
28 }
29 }
30}
static void Fill< T >(this Matrix< T > M, T Value)
Fills the matrix with a value.
Definition: Fill.cs:14
Implements a Matrix, basic component for computations in Image Processing and Computer Vision.
Definition: Matrix.cs:12