예제 #1
0
        /// <summary>
        /// Get a copy of this vector.
        /// </summary>
        public NNVector <T> Clone()
        {
            NNVector <T> copy = new NNVector <T>(Size);

            copy.vector = vector.Select(x => x).ToList();

            return(copy);
        }
예제 #2
0
        /// <summary>
        /// Concatenate the contents of one vector to the end of another.
        /// </summary>
        public static NNVector <T> Concatenate(NNVector <T> lhs, NNVector <T> rhs)
        {
            NNVector <T> both = new NNVector <T>();

            for (int i = 0; i < lhs.Size; i++)
            {
                both.vector.Add(lhs[i]);
            }

            for (int i = 0; i < rhs.Size; i++)
            {
                both.vector.Add(rhs[i]);
            }

            return(both);
        }