Exemple #1
0
        internal PrimitiveDataFrameColumnContainer <bool> CreateBoolContainerForCompareOps()
        {
            var ret = new PrimitiveDataFrameColumnContainer <bool>();

            foreach (var buffer in Buffers)
            {
                DataFrameBuffer <bool> newBuffer = new DataFrameBuffer <bool>();
                ret.Buffers.Add(newBuffer);
                newBuffer.EnsureCapacity(buffer.Length);
                newBuffer.Span.Fill(false);
                newBuffer.Length = buffer.Length;
                ret.Length      += buffer.Length;
            }
            return(ret);
        }
Exemple #2
0
        public PrimitiveDataFrameColumnContainer <T> Clone()
        {
            var ret = new PrimitiveDataFrameColumnContainer <T>();

            foreach (DataFrameBuffer <T> buffer in Buffers)
            {
                DataFrameBuffer <T> newBuffer = new DataFrameBuffer <T>();
                ret.Buffers.Add(newBuffer);
                var span = buffer.Span;
                ret.Length += buffer.Length;
                for (int i = 0; i < buffer.Length; i++)
                {
                    newBuffer.Append(span[i]);
                }
            }
            return(ret);
        }
Exemple #3
0
        internal PrimitiveDataFrameColumn <bool> CreateBoolColumnForCompareOps()
        {
            PrimitiveDataFrameColumnContainer <bool> newColumnContainer = _columnContainer.CreateBoolContainerForCompareOps();

            return(new PrimitiveDataFrameColumn <bool>(Name, newColumnContainer));
        }
Exemple #4
0
        public PrimitiveDataFrameColumn <T> Clone()
        {
            PrimitiveDataFrameColumnContainer <T> newColumnContainer = _columnContainer.Clone();

            return(new PrimitiveDataFrameColumn <T>(Name, newColumnContainer));
        }
Exemple #5
0
 public PrimitiveDataFrameColumn(string name, bool isNullable = true) : base(name)
 {
     _columnContainer = new PrimitiveDataFrameColumnContainer <T>();
 }
Exemple #6
0
 public PrimitiveDataFrameColumn(string name, IEnumerable <T> values) : base(name)
 {
     _columnContainer = new PrimitiveDataFrameColumnContainer <T>(values);
     Length           = _columnContainer.Length;
 }
Exemple #7
0
 internal PrimitiveDataFrameColumn(string name, PrimitiveDataFrameColumnContainer <T> column) : base(name, column.Length)
 {
     _columnContainer = column;
 }