<commit_before>using System;
using System.Collections.Generic;
using System.Text;

namespace Aardvark.Base
{

    public enum Metric
    {
        Manhattan = 1,
        Euclidean = 2,
        Maximum = int.MaxValue,

        L1 = Manhattan,
        L2 = Euclidean,
        LInfinity = Maximum,
    }

    public static class Constant<T>
    {
        /// <summary>
        /// A value that is or is close to the minimum value of the type, but
        /// can be parsed back without exception.
        /// </summary>
        public static readonly T ParseableMinValue;

        /// <summary>
        /// A value that is or is close to the maximum value of the type, but
        /// can be parsed back without exception.
        /// </summary>
        public static readonly T ParseableMaxValue;

        /// <summary>
        /// The smallest value that can be added to 1.0 for obtaining a result
        /// that is different from 1.0.
        /// </summary>
        public static readonly T MachineEpsilon;

        /// <summary>
        /// Four times the MachineEpsilon of the type.
        /// </summary>
        public static readonly T PositiveTinyValue;

        /// <summary>
        /// Minus four times the MachineEpsilon of the type.
        /// </summary>
        public static readonly T NegativeTinyValue;

        private static volatile float floatStore;

        static Constant()
        {
            // Console.WriteLine("initializing {0}", typeof(T).Name);

            if (typeof(T) == typeof(byte))
            {
                Constant<byte>.ParseableMinValue = byte.MinValue;
                Constant<byte>.ParseableMaxValue = byte.MaxValue;
                Constant<byte>.MachineEpsilon = (byte)1;
                Constant<byte>.PositiveTinyValue = (byte)4;
            }
            else if (typeof(T) == typeof(ushort))
            {
                Constant<ushort>.ParseableMinValue = ushort.MinValue;
                Constant<ushort>.ParseableMaxValue = ushort.MaxValue;
                Constant<ushort>.MachineEpsilon = (ushort)1;
                Constant<ushort>.PositiveTinyValue = (ushort)4;
            }
            else if (typeof(T) == typeof(uint))
            {
                Constant<uint>.ParseableMinValue = uint.MinValue;
                Constant<uint>.ParseableMaxValue = uint.MaxValue;
                Constant<uint>.MachineEpsilon = (uint)1;
                Constant<uint>.PositiveTinyValue = (uint)4;
            }
            else if (typeof(T) == typeof(ulong))
            {
                Constant<ulong>.ParseableMinValue = ulong.MinValue;
                Constant<ulong>.ParseableMaxValue = ulong.MaxValue;
                Constant<ulong>.MachineEpsilon = (ulong)1;
                Constant<ulong>.PositiveTinyValue = (ulong)4;
            }
            else if (typeof(T) == typeof(sbyte))
            {
                Constant<sbyte>.ParseableMinValue = sbyte.MinValue;
                Constant<sbyte>.ParseableMaxValue = sbyte.MaxValue;
                Constant<sbyte>.MachineEpsilon = (sbyte)1;
                Constant<sbyte>.PositiveTinyValue = (sbyte)4;
                Constant<sbyte>.NegativeTinyValue = (sbyte)-4;
            }
            else if (typeof(T) == typeof(short))
            {
                Constant<short>.ParseableMinValue = short.MinValue;
                Constant<short>.ParseableMaxValue = short.MaxValue;
                Constant<short>.MachineEpsilon = (short)1;
                Constant<short>.PositiveTinyValue = (short)4;
                Constant<short>.NegativeTinyValue = (short)-4;
            }
            else if (typeof(T) == typeof(int))
            {
                Constant<int>.ParseableMinValue = int.MinValue;
                Constant<int>.ParseableMaxValue = int.MaxValue;
                Constant<int>.MachineEpsilon = 1;
                Constant<int>.PositiveTinyValue = 4;
                Constant<int>.NegativeTinyValue = -4;
            }
            else if (typeof(T) == typeof(ushort))<commit_msg>fixed copy and paste error (Constant<long> was not properly initialized)<commit_after>using System;
using System.Collections.Generic;
using System.Text;

namespace Aardvark.Base
{

    public enum Metric
    {
        Manhattan = 1,
        Euclidean = 2,
        Maximum = int.MaxValue,

        L1 = Manhattan,
        L2 = Euclidean,
        LInfinity = Maximum,
    }

    public static class Constant<T>
    {
        /// <summary>
        /// A value that is or is close to the minimum value of the type, but
        /// can be parsed back without exception.
        /// </summary>
        public static readonly T ParseableMinValue;

        /// <summary>
        /// A value that is or is close to the maximum value of the type, but
        /// can be parsed back without exception.
        /// </summary>
        public static readonly T ParseableMaxValue;

        /// <summary>
        /// The smallest value that can be added to 1.0 for obtaining a result
        /// that is different from 1.0.
        /// </summary>
        public static readonly T MachineEpsilon;

        /// <summary>
        /// Four times the MachineEpsilon of the type.
        /// </summary>
        public static readonly T PositiveTinyValue;

        /// <summary>
        /// Minus four times the MachineEpsilon of the type.
        /// </summary>
        public static readonly T NegativeTinyValue;

        private static volatile float floatStore;

        static Constant()
        {
            // Console.WriteLine("initializing {0}", typeof(T).Name);

            if (typeof(T) == typeof(byte))
            {
                Constant<byte>.ParseableMinValue = byte.MinValue;
                Constant<byte>.ParseableMaxValue = byte.MaxValue;
                Constant<byte>.MachineEpsilon = (byte)1;
                Constant<byte>.PositiveTinyValue = (byte)4;
            }
            else if (typeof(T) == typeof(ushort))
            {
                Constant<ushort>.ParseableMinValue = ushort.MinValue;
                Constant<ushort>.ParseableMaxValue = ushort.MaxValue;
                Constant<ushort>.MachineEpsilon = (ushort)1;
                Constant<ushort>.PositiveTinyValue = (ushort)4;
            }
            else if (typeof(T) == typeof(uint))
            {
                Constant<uint>.ParseableMinValue = uint.MinValue;
                Constant<uint>.ParseableMaxValue = uint.MaxValue;
                Constant<uint>.MachineEpsilon = (uint)1;
                Constant<uint>.PositiveTinyValue = (uint)4;
            }
            else if (typeof(T) == typeof(ulong))
            {
                Constant<ulong>.ParseableMinValue = ulong.MinValue;
                Constant<ulong>.ParseableMaxValue = ulong.MaxValue;
                Constant<ulong>.MachineEpsilon = (ulong)1;
                Constant<ulong>.PositiveTinyValue = (ulong)4;
            }
            else if (typeof(T) == typeof(sbyte))
            {
                Constant<sbyte>.ParseableMinValue = sbyte.MinValue;
                Constant<sbyte>.ParseableMaxValue = sbyte.MaxValue;
                Constant<sbyte>.MachineEpsilon = (sbyte)1;
                Constant<sbyte>.PositiveTinyValue = (sbyte)4;
                Constant<sbyte>.NegativeTinyValue = (sbyte)-4;
            }
            else if (typeof(T) == typeof(short))
            {
                Constant<short>.ParseableMinValue = short.MinValue;
                Constant<short>.ParseableMaxValue = short.MaxValue;
                Constant<short>.MachineEpsilon = (short)1;
                Constant<short>.PositiveTinyValue = (short)4;
                Constant<short>.NegativeTinyValue = (short)-4;
            }
            else if (typeof(T) == typeof(int))
            {
                Constant<int>.ParseableMinValue = int.MinValue;
                Constant<int>.ParseableMaxValue = int.MaxValue;
                Constant<int>.MachineEpsilon = 1;
                Constant<int>.PositiveTinyValue = 4;
                Constant<int>.NegativeTinyValue = -4;
            }
            else if (typeof(T) == typeof(long))
{'fraction_non_alphanumeric': 0.10381905821282907, 'fraction_numerical': 0.0064268940798418, 'mean_word_length': 1.681245858184228, 'pattern_counts': {'":': 0, '<': 88, '<?xml version=': 0, '>': 88, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3610097', 'n_tokens_mistral': 2214, 'n_tokens_neox': 2082, 'n_words': 488}