public class Util
extends java.lang.Object
README
.Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static void |
error(java.lang.String msg)
Throw a RuntimeException,
RTE(msg) . |
static int |
interleave16(int m,
int n)
Return the lower 16 bits of 'm' and of 'n' interleaved.
|
static int |
location(int[] ns,
int n)
Binary search 'ns[]' for 'n'; return n's location or else -1.
|
static void |
main(java.lang.String[] args) |
static java.lang.RuntimeException |
RTE(java.lang.String msg)
Convenience function for new RuntimeException(msg).
|
static boolean |
search(int[] ns,
int n)
Binary search 'ns[]' for 'n'. |
static java.lang.String |
x2String(double x)
Render a double, x, compactly and to at least three
significant digits; also see
x2String(double,int) . |
static java.lang.String |
x2String(double x,
int sigDigits)
Render a double, x, as compactly as possibly while
guaranteeing 'sigDigits' significant digits.
|
public static java.lang.RuntimeException RTE(java.lang.String msg)
public static void error(java.lang.String msg)
RTE(msg)
.public static java.lang.String x2String(double x)
x2String(double,int)
.public static java.lang.String x2String(double x, int sigDigits)
public static int location(int[] ns, int n)
search(ns,n)
.public static boolean search(int[] ns, int n)
Binary search
'ns[]' for 'n'.
Is its location
within the array?public static int interleave16(int m, int n)
public static void main(java.lang.String[] args)