Java Code Examples for com.google.common.primitives.Floats#asList()
The following examples show how to use
com.google.common.primitives.Floats#asList() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TensorUtil.java From jpmml-tensorflow with GNU Affero General Public License v3.0 | 7 votes |
static public List<?> getValues(Tensor tensor){ DataType dataType = tensor.dataType(); switch(dataType){ case FLOAT: return Floats.asList(TensorUtil.toFloatArray(tensor)); case DOUBLE: return Doubles.asList(TensorUtil.toDoubleArray(tensor)); case INT32: return Ints.asList(TensorUtil.toIntArray(tensor)); case INT64: return Longs.asList(TensorUtil.toLongArray(tensor)); case STRING: return Arrays.asList(TensorUtil.toStringArray(tensor)); case BOOL: return Booleans.asList(TensorUtil.toBooleanArray(tensor)); default: throw new IllegalArgumentException(); } }
Example 2
Source File: OneCameraCharacteristicsImpl.java From Camera2 with Apache License 2.0 | 4 votes |
@Override public List<Float> getAvailableFocalLengths() { return Floats.asList(mCameraCharacteristics.get(CameraCharacteristics.LENS_INFO_AVAILABLE_FOCAL_LENGTHS)); }