示例#1
0
static_matrix<T, X>::static_matrix(static_matrix const &A, unsigned * /* basis */) :
    m_work_pivot_vector(A.row_count(), numeric_traits<T>::zero()) {
    unsigned m = A.row_count();
    init_row_columns(m, m);
    while (m--) {
        for (auto & col : A.m_columns[m]){
            set(col.m_i, m, A.get_value_of_column_cell(col));
        }
    }
}
示例#2
0
void lar_solver::prepare_core_solver_fields(static_matrix<U, V> & A, std::vector<V> & x,
                                            std::vector<V> & low_bound,
                                            std::vector<V> & upper_bound) {
    create_matrix_A(A);
    fill_bounds_for_core_solver(low_bound, upper_bound);
    if (m_status == INFEASIBLE) {
        lean_assert(false); // not implemented
    }
    resize_and_init_x_with_zeros(x, A.column_count());
    lean_assert(m_lar_core_solver_params.m_basis.size() == A.row_count());
}