![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Classes | |
| struct | Net |
| struct | Arc |
| struct | Walk |
| struct | Elim |
Typedefs | |
| typedef std::vector< double > | Vec |
| typedef std::vector< Vec > | Mat |
Functions | |
| std::string | fmt (const char *f, double a=0, double b=0, double c=0, double d=0) |
| void | refuse (const std::string &m) |
| void | unstable (const std::string &m) |
| void | badarg (const std::string &m) |
| Mat | zeros (std::size_t n, std::size_t m) |
| Mat | eye (std::size_t n) |
| std::size_t | ncols (const Mat &A) |
| Mat | sub (const Mat &A, const std::vector< std::size_t > &r, const std::vector< std::size_t > &c) |
| bool | all_zero (const Mat &A) |
| double | max_abs (const Vec &a) |
| double | max_abs (const Mat &A) |
| double | max_abs_diff (const Mat &A, const Mat &B) |
| Mat | plus (const Mat &A, const Mat &B) |
| Mat | minus (const Mat &A, const Mat &B) |
| Mat | scale (const Mat &A, double s) |
| Mat | mult (const Mat &A, const Mat &B) |
| Vec | vec_mult (const Vec &x, const Mat &A) |
| double | sum (const Vec &a) |
| Vec | row_sums (const Mat &A) |
| double | dot (const Vec &a, const Vec &b) |
| std::vector< std::size_t > | lu (Mat &A) |
| LU with partial pivoting in place; returns the row permutation. | |
| Mat | solve (const Mat &A0, const Mat &B) |
| Solves A X = B. | |
| Mat | inv (const Mat &A) |
| Vec | solve_left (const Mat &A, const Vec &b) |
| Solves x A = b for the row vector x. | |
| double | norm1 (const Mat &A) |
| double | cond1 (const Mat &A) |
| Matrix< double > | to_matrix (const Mat &A) |
| Mat | from_matrix (const Matrix< double > &M) |
| Vec | enabled_weights (const Net &net, const Vec &m, std::vector< bool > &en) |
| std::size_t | lookup (Walk &W, std::map< std::vector< long long >, std::size_t > &keys, const Vec &m, const Net &net, int cap, const IspnOptions &opt) |
| Walk | explore (const Net &net, const Vec &m0, int cap, const IspnOptions &opt) |
| Elim | eliminate (const Walk &W, const Net &net, int Ktop) |
| int | find_K (const Elim &E, int Ktop, const IspnOptions &opt, std::size_t p0) |
| double | expect (const Vec &r, const std::string &what, const Mat &x, const std::vector< std::vector< std::size_t > > &lv, int K, int Ktop, const Vec &c1, const Vec &c2, double tol) |
| long long | gcd_ll (long long a, long long b) |
| std::vector< Vec > | minimal (const std::vector< Vec > &D, std::size_t T, std::size_t P) |
| typedef std::vector<Vec> line::spn::ispn_detail::Mat |
Definition at line 102 of file spn_ispn.h.
| typedef std::vector<double> line::spn::ispn_detail::Vec |
Definition at line 101 of file spn_ispn.h.
|
inline |
|
inline |
Definition at line 116 of file spn_ispn.h.
References badarg(), and line::InputError::InputError().
|
inline |
Definition at line 277 of file spn_ispn.h.
References cond1(), inv(), and norm1().
Referenced by cond1(), and eliminate().
Definition at line 396 of file spn_ispn.h.
References line::spn::ispn_detail::Walk::arcs, cond1(), line::spn::ispn_detail::Arc::dst, eliminate(), eye(), fmt(), inv(), line::spn::ispn_detail::Walk::isvan, line::spn::ispn_detail::Elim::levidx, minus(), mult(), line::spn::ispn_detail::Elim::nvan, line::spn::ispn_detail::Net::other, line::spn::ispn_detail::Net::P, line::spn::ispn_detail::Net::p0, plus(), line::spn::ispn_detail::Elim::Q, refuse(), line::spn::ispn_detail::Elim::S, line::spn::ispn_detail::Walk::S, line::spn::ispn_detail::Arc::src, line::spn::ispn_detail::Net::T, line::spn::ispn_detail::Elim::trate, line::spn::ispn_detail::Arc::trn, line::spn::ispn_detail::Arc::val, and zeros().
Referenced by eliminate().
|
inline |
Definition at line 329 of file spn_ispn.h.
References enabled_weights(), line::spn::ispn_detail::Net::inh, line::spn::ispn_detail::Net::P, line::spn::ispn_detail::Net::pre, line::spn::ispn_detail::Net::rate, line::spn::ispn_detail::Net::srv, and line::spn::ispn_detail::Net::T.
Referenced by enabled_weights(), and explore().
|
inline |
Definition at line 361 of file spn_ispn.h.
References line::spn::ispn_detail::Walk::arcs, badarg(), enabled_weights(), explore(), line::spn::ispn_detail::Net::imm, line::spn::ispn_detail::Walk::isvan, lookup(), line::spn::ispn_detail::Net::P, line::spn::ispn_detail::Net::p0, line::spn::ispn_detail::Net::post, line::spn::ispn_detail::Net::pre, line::spn::ispn_detail::Walk::S, and line::spn::ispn_detail::Net::T.
Referenced by explore().
|
inline |
Definition at line 121 of file spn_ispn.h.
References eye(), and zeros().
Referenced by eliminate(), eye(), and inv().
|
inline |
Definition at line 476 of file spn_ispn.h.
References find_K(), line::spn::ispn_detail::Elim::levidx, max_abs(), max_abs_diff(), line::spn::ispn_detail::Elim::Q, line::spn::ispn_detail::Elim::S, and sub().
Referenced by find_K().
|
inline |
Definition at line 104 of file spn_ispn.h.
References fmt().
Referenced by eliminate(), fmt(), and lookup().
Definition at line 290 of file spn_ispn.h.
References line::Matrix< T >::cols(), from_matrix(), line::Matrix< T >::rows(), and zeros().
Referenced by from_matrix().
|
inline |
Definition at line 253 of file spn_ispn.h.
References eye(), inv(), and solve().
Referenced by cond1(), eliminate(), and inv().
|
inline |
Definition at line 346 of file spn_ispn.h.
References fmt(), lookup(), line::spn::ispn_detail::Net::p0, refuse(), and line::spn::ispn_detail::Walk::S.
|
inline |
LU with partial pivoting in place; returns the row permutation.
Definition at line 208 of file spn_ispn.h.
References lu().
|
inline |
Definition at line 144 of file spn_ispn.h.
References max_abs().
|
inline |
Definition at line 149 of file spn_ispn.h.
References max_abs_diff().
Referenced by find_K(), and max_abs_diff().
Definition at line 161 of file spn_ispn.h.
References minus().
Referenced by eliminate(), and minus().
Definition at line 173 of file spn_ispn.h.
References mult(), ncols(), and zeros().
Referenced by eliminate(), and mult().
|
inline |
Definition at line 126 of file spn_ispn.h.
References ncols().
Referenced by mult(), ncols(), norm1(), solve(), to_matrix(), and vec_mult().
|
inline |
Definition at line 155 of file spn_ispn.h.
References plus().
Referenced by eliminate(), and plus().
|
inline |
Definition at line 110 of file spn_ispn.h.
References refuse(), and line::UnsupportedError::UnsupportedError().
Referenced by eliminate(), lookup(), and refuse().
Definition at line 196 of file spn_ispn.h.
References row_sums(), and sum().
Referenced by row_sums().
Solves A X = B.
Definition at line 233 of file spn_ispn.h.
References lu(), ncols(), solve(), and zeros().
Referenced by inv(), solve(), and solve_left().
Solves x A = b for the row vector x.
Definition at line 256 of file spn_ispn.h.
References solve(), solve_left(), and zeros().
Referenced by solve_left().
|
inline |
Definition at line 284 of file spn_ispn.h.
References ncols(), and to_matrix().
Referenced by to_matrix().
|
inline |
Definition at line 113 of file spn_ispn.h.
References line::NumericError::NumericError(), and unstable().
Referenced by unstable().
Definition at line 184 of file spn_ispn.h.
References ncols(), and vec_mult().
Referenced by vec_mult().
|
inline |
Definition at line 120 of file spn_ispn.h.
References zeros().
Referenced by eliminate(), eye(), from_matrix(), mult(), solve(), solve_left(), sub(), and zeros().