mlpack_range_search(1)
πΈ mlpack_range_search β bestie edition π
okay so this is the mlpack_range_search page from the mlpack manual, section 1 (User Commands), and I'm gonna walk you through it like we're texting at 2am. grab a snack. π
β¨ NAME β¨
mlpack_range_search β range search. that's it. that's the whole name. short, sweet, iconic. π
π¦ SYNOPSIS π¦
mlpack_range_search [-m unknown] [-l int] [-U double] [-L double] [-N bool] [-q unknown] [-R bool] [-r unknown] [-s int] [-S bool] [-t string] [-V bool] [-d string] [-n string] [-M unknown] [-h -v]
like. she has a LOT of flags. she's a main character fr fr.
π DESCRIPTION π
so this program does range search with a Euclidean distance metric. no cap.
here's the vibe: you give her a query point, a range, and a set of reference points β and she hands you back every single reference point whose distance to that query point falls inside the range you asked for. and she doesn't do this for just one query point, bestie, she does it for an entire set of them. the way that she justβ¦ handles the whole set. π
and you have options:
- you can give her a separate set of reference points AND query points, or
- you can give her only a reference set β and then she just uses that same set as both the reference and the query set. efficient. we love her. π«Ά
also very important: the range is inclusive. meaning points whose distance is exactly equal to the minimum or maximum of the range still count and still show up in your results. don't come for her about the boundaries, they're intentional. β¨
so like, for example, the following will calculate the points within the range [2, 5] of each point in 'input.csv' and store the distances in 'distances.csv' and the neighbors in 'neighbors.csv':
$ mlpack_range_search --min 2 --max 5 --distances_file input
--distances_file distances --neighbors_file neighbors
(yes, the example really is written like that, we're keeping it character-for-character, don't @ me π)
okay so about the output files β the organization is this: line i corresponds to the points found for query point i. and because sometimes the range finds literally zero points (it happens!! it's giving empty), lines of the output files may be completely empty. and the points are not ordered in any specific manner. no sorting, no ranking, no nothing. she's not here to be tidy, she's here to be correct. π
and here's the messy part, ngl: because the number of points returned for each query point can be different, the resultant CSV-like files may not be loadable by many programs. π however β and this is straight from the source β at this time a better way to store this non-square result is not known.
so yeah. as a result, any output files will be written as CSVs in this manner, regardless of the given extension..txt? still CSV..coolformat? still CSV. periodt. π
π OPTIONAL INPUT OPTIONS π
every single one of them, bestie. buckle up. π
--help(-h)[bool]β Default help info.--info[string]β Print help on a specific option. Default value''.--input_model_file(-m)[unknown]β File containing pre-trained range search model.--leaf_size(-l)[int]β Leaf size for tree building (used for kd-trees, vp trees, random projection trees, UB trees, R trees, R* trees, X trees, Hilbert R trees, R+ trees, R++ trees, and octrees). Default value20.--max(-U)[double]β Upper bound in range (if not specified,+infwill be used. Default value0.--min(-L)[double]β Lower bound in range. Default value0.--naive(-N)[bool]β If true,O(n^2)naive mode is used for computation.--query_file(-q)[unknown]β File containing query points (optional).--random_basis(-R)[bool]β Before tree-building, project the data onto a random orthogonal basis.--reference_file(-r)[unknown]β Matrix containing the reference dataset.--seed(-s)[int]β Random seed (if0,std::time(NULL)is used). Default value0.--single_mode(-S)[bool]β If true, single-tree search is used (as opposed to dual-tree search).--tree_type(-t)[string]β Type of tree to use:'kd','vp','rp','max-rp','ub','cover','r','r-star','x','ball','hilbert-r','r-plus','r-plus-plus','oct'. Default value'kd'.--verbose(-v)[bool]β Display informational messages and the full list of parameters and timers at the end of execution.--version(-V)[bool]β Display the version of mlpack.
π OPTIONAL OUTPUT OPTIONS π
the "where do my results go" section. iconic.
--distances_file(-d)[string]β File to output distances into. Default value''.--neighbors_file(-n)[string]β File to output neighbors into. Default value''.--output_model_file(-M)[unknown]β If specified, the range search model will be saved to the given file.
π ADDITIONAL INFORMATION π
for further information β including relevant papers, citations, and theory β consult the documentation found at http://www.mlpack.org or included with your distribution of mlpack. iykyk, go read the theory, it's actually cute. π§
and that's the whole page babes!! this was mlpack-4.8.0, dated 22 June 2026, and it lives at mlpack_range_search(1). go find some neighbors within range. slay. πβ¨ππ¦
π¦ where this page comes from
- ubuntu stonking: mlpack-bin 4.8.0-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms