onehot
Functions
-
int main(int argc, char *argv[])
onehot [ option ] [ infile ]
-l int
length of vector \((1 \le L)\)
-m int
order of vector \((0 \le L - 1)\)
infile str
int-type 0-based index
stdout
double-type one-hot vector
ramp -l 3 | x2x +di | onehot -l 3 | x2x +da # 1, 0, 0, 0, 1, 0, 0, 0, 1
- Parameters:
argc – [in] Number of arguments.
argv – [in] Argument vector.
- Returns:
0 on success, 1 on failure.