Package utils

Class OTMUtils


  • public class OTMUtils
    extends Object
    • Field Detail

      • epsilon

        public static double epsilon
      • lane_group_counter

        public static long lane_group_counter
      • vehicle_id_count

        public static long vehicle_id_count
    • Constructor Detail

      • OTMUtils

        public OTMUtils()
    • Method Detail

      • reset_counters

        public static void reset_counters()
      • set_random_seed

        public static void set_random_seed​(long seed)
      • hashset

        public static <T> HashSet<T> hashset​(T x)
      • toDoubleArray

        public static double[] toDoubleArray​(List list)
      • toFloatArray

        public static float[] toFloatArray​(List list)
      • toLongArray

        public static long[] toLongArray​(List list)
      • init_list

        public static <T> List<T> init_list​(int n,
                                            T val)
      • min

        public static int min​(int a,
                              int b)
      • approximately_equals

        public static boolean approximately_equals​(double x,
                                                   double y)
      • greater_than

        public static boolean greater_than​(double x,
                                           double y)
      • sum

        public static <T> double sum​(Map<T,​Double> X)
      • random_int

        public static int random_int​(int min,
                                     int max)
      • random_double

        public static double random_double​(double min,
                                           double max)
      • random_zero_to_one

        public static double random_zero_to_one()
      • snap_to_grid

        public static double snap_to_grid​(double x,
                                          double gridsize)
      • sample_from_set

        public static <T> T sample_from_set​(Set<T> set)
      • csv2longlist

        public static List<Long> csv2longlist​(String csstr)
      • int_hash_int

        public static int[] int_hash_int​(String str)
      • format_delim

        public static <T> String format_delim​(T[] array,
                                              String delim)
      • format_delim

        public static String format_delim​(double[] array,
                                          String delim)
      • read_lanes

        public static int[] read_lanes​(String str,
                                       int full_lanes)
      • read_int_table

        public static int[][] read_int_table​(String str)
      • write_int_table

        public static String write_int_table​(int[][] table)
      • get_lanegroup_id

        public static long get_lanegroup_id()
      • get_vehicle_id

        public static long get_vehicle_id()