LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Toggle main menu visibility
Loading...
Searching...
No Matches
line_citations.h
Go to the documentation of this file.
1
// Copyright (c) 2012-2026, QORE Lab, Imperial College London
2
// All rights reserved.
3
#ifndef LINE_IO_LINE_CITATIONS_H
4
#define LINE_IO_LINE_CITATIONS_H
5
6
/**
7
* @file
8
* @ingroup line_io
9
* Bibliographic references for the algorithms a run used.
10
*
11
* Port of MATLAB `matlab/src/io/line_citations.m`, the JAR
12
* `jline.io.LineCitations` and python `line_solver/api/io/citations.py`. The
13
* registry is the manual's method-to-citation table (`doc/latex/manual.tex`)
14
* and its bibliography; keep the two in step.
15
*
16
* ATTRIBUTION IN LINE IS PULL-BASED. Nothing is printed during a solve; a user
17
* asks for the references when writing the run up. A method that reaches a user
18
* without an entry here is a silent loss of attribution, so a new or renamed
19
* solver method, analyzer, transformation or approximation adds its entry in
20
* the SAME change, in all four codebases.
21
*
22
* METHOD NAME LOOKUP, identical to the other three: a method name is lowercased and
23
* trimmed; an exact match wins; otherwise a family-qualified method name falls back
24
* to the bare method name after its first dot, so `nc.mva` finds `mva` when
25
* `nc.mva` is absent. Unknown method names are ignored, so a caller may pass whatever
26
* it knows about a run, including the `default/<actual>` compound a dispatching
27
* solver reports (split it on '/' and pass both halves). Results are
28
* de-duplicated BY BIBLIOGRAPHY KEY, since one paper is often reachable through
29
* several method names, and keep the order of first appearance.
30
*/
31
32
#include <map>
33
#include <string>
34
#include <vector>
35
36
namespace
line
{
37
namespace
io
{
38
39
/** One bibliography entry. */
40
struct
Citation
{
41
/** Bibliography key, as used in doc/latex/biblio.bib. */
42
std::string
key
;
43
/** Short reference: author, title, venue, year. */
44
std::string
ref
;
45
/** One line saying which part of the solution process it covers. */
46
std::string
covers
;
47
};
48
49
/** The whole method name -> reference table, built once. */
50
const
std::map<std::string, Citation>&
citation_registry
();
51
52
/** The references for METHOD NAMES, de-duplicated by key, in order of appearance. */
53
std::vector<Citation>
line_citations
(
const
std::vector<std::string>& method_names);
54
55
/** Convenience for the `default/<actual>` compound a solver reports. */
56
std::vector<Citation>
line_citations_for_method
(
const
std::string& method);
57
58
}
// namespace io
59
}
// namespace line
60
61
#endif
// LINE_IO_LINE_CITATIONS_H
line::io
Definition
docker_image.h:43
line::io::line_citations
std::vector< Citation > line_citations(const std::vector< std::string > &method_names)
The references for METHOD NAMES, de-duplicated by key, in order of appearance.
Definition
line_citations.cpp:1564
line::io::citation_registry
const std::map< std::string, Citation > & citation_registry()
The whole method name -> reference table, built once.
Definition
line_citations.cpp:43
line::io::line_citations_for_method
std::vector< Citation > line_citations_for_method(const std::string &method)
Convenience for the default/<actual> compound a solver reports.
Definition
line_citations.cpp:1587
line
Definition
aoi_dist2ph.h:52
line::io::Citation
One bibliography entry.
Definition
line_citations.h:40
line::io::Citation::key
std::string key
Bibliography key, as used in doc/latex/biblio.bib.
Definition
line_citations.h:42
line::io::Citation::ref
std::string ref
Short reference: author, title, venue, year.
Definition
line_citations.h:44
line::io::Citation::covers
std::string covers
One line saying which part of the solution process it covers.
Definition
line_citations.h:46
include
line
io
line_citations.h
Generated by
1.18.0