public ColInfoEx(DataKind kind, bool hasKeyRange, DataViewType type, VectorDataViewType slotType) { Contracts.AssertValue(type); Contracts.AssertValueOrNull(slotType); Contracts.Assert(slotType == null || type.ItemType().Equals(slotType.ItemType())); Kind = kind; HasKeyRange = hasKeyRange; TypeDst = type; SlotTypeDst = slotType; }
public static Tuple <DataKind, ArrayKind> GetKindArray(DataViewType type) { if (type.IsVector()) { int dc = type.AsVector().DimCount(); return(new Tuple <DataKind, ArrayKind>(type.ItemType().RawKind(), dc == 1 && type.AsVector().GetDim(0) > 0 ? ArrayKind.Array : ArrayKind.VBuffer)); } else { return(new Tuple <DataKind, ArrayKind>(type.RawKind(), ArrayKind.None)); } }