Package cern.colt.map

Examples of cern.colt.map.AbstractIntDoubleMap


// using a map
int[]    keys   = {0    , 3     , 100000, 9   };
double[] values = {100.0, 1000.0, 70.0  , 71.0};

int size = keys.length;
AbstractIntDoubleMap map = new OpenIntDoubleHashMap(size*2, 0.2, 0.5);

for (int i=0; i<keys.length; i++) {
   map.put(keys[i], (int)values[i]);
}

System.out.println(map.containsKey(3));
System.out.println(map.get(3));

System.out.println(map.containsKey(4));
System.out.println(map.get(4));

System.out.println(map.containsValue((int)71.0));
System.out.println(map.keyOf((int)71.0));

System.out.println(map);
}
View Full Code Here


// using a map
int[]    keys   = {0    , 3     , 100000, 9   };
double[] values = {100.0, 1000.0, 70.0  , 71.0};

int size = keys.length;
AbstractIntDoubleMap map = new OpenIntDoubleHashMap(size*2, 0.2, 0.5);

for (int i=0; i<keys.length; i++) {
   map.put(keys[i], (int)values[i]);
}

System.out.println(map.containsKey(3));
System.out.println(map.get(3));

System.out.println(map.containsKey(4));
System.out.println(map.get(4));

System.out.println(map.containsValue((int)71.0));
System.out.println(map.keyOf((int)71.0));

System.out.println(map);
}
View Full Code Here

TOP

Related Classes of cern.colt.map.AbstractIntDoubleMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.