YAMP.Numerics.BlasL1.dSwap C# (CSharp) Méthode

dSwap() public static méthode

Swaps the elements of some vector x and some vector y.
public static dSwap ( double xStore, int xOffset, int xStride, double yStore, int yOffset, int yStride, int count ) : void
xStore double The first vector.
xOffset int Offset in the first vector.
xStride int The offset between two elements of the first vector.
yStore double The second vector.
yOffset int Offset in the second vector.
yStride int The offset between two elements of the second vector.
count int Number of elements to swap.
Résultat void
        public static void dSwap(double[] xStore, int xOffset, int xStride, double[] yStore, int yOffset, int yStride, int count)
        {
            int n = 0;
            int x = xOffset;
            int y = yOffset;

            while (n < count)
            {
                double t = xStore[x];
                xStore[x] = yStore[y];
                yStore[y] = t;
                n++;
                x += xStride;
                y += yStride;
            }
        }