<commit_before>#include "../SDP_Solver.hxx"

// Create and initialize an SDPSolver for the given SDP and
// SDP_Solver_Parameters
SDP_Solver::SDP_Solver(const std::vector<boost::filesystem::path> &sdp_files,
                       const SDP_Solver_Parameters &parameters)
    : sdp(sdp_files), parameters(parameters),
      x(sdp.primal_objective_c.size(), 0),
      x_elemental(sdp.schur_block_dims(), 1), X(sdp.psd_matrix_block_dims()),
      y(sdp.dual_objective_b_elemental.Height(), 0),
      y_elemental(sdp.dual_objective_b_elemental.Height(), 1), Y(X),
      primal_residues(X), dual_residues(x),
      // FIXME: Maybe we can use schur_block_dims() instead of making a copy?
      dual_residues_elemental(x_elemental)
{
  Zero(y_elemental);
  
  // X = \Omega_p I
  X.add_diagonal(parameters.initial_matrix_scale_primal);
  X.add_diagonal(parameters.initial_matrix_scale_primal_elemental);
  // Y = \Omega_d I
  Y.add_diagonal(parameters.initial_matrix_scale_dual);
  Y.add_diagonal(parameters.initial_matrix_scale_dual_elemental);
}<commit_msg>Explicitly initialize X and Y to zero<commit_after>#include "../SDP_Solver.hxx"

// Create and initialize an SDPSolver for the given SDP and
// SDP_Solver_Parameters
SDP_Solver::SDP_Solver(const std::vector<boost::filesystem::path> &sdp_files,
                       const SDP_Solver_Parameters &parameters)
    : sdp(sdp_files), parameters(parameters),
      x(sdp.primal_objective_c.size(), 0),
      x_elemental(sdp.schur_block_dims(), 1), X(sdp.psd_matrix_block_dims()),
      y(sdp.dual_objective_b_elemental.Height(), 0),
      y_elemental(sdp.dual_objective_b_elemental.Height(), 1), Y(X),
      primal_residues(X), dual_residues(x),
      // FIXME: Maybe we can use schur_block_dims() instead of making a copy?
      dual_residues_elemental(x_elemental)
{
  X.set_zero();
  Y.set_zero();
  Zero(y_elemental);

  // X = \Omega_p I
  X.add_diagonal(parameters.initial_matrix_scale_primal);
  X.add_diagonal(parameters.initial_matrix_scale_primal_elemental);
  // Y = \Omega_d I
  Y.add_diagonal(parameters.initial_matrix_scale_dual);
  Y.add_diagonal(parameters.initial_matrix_scale_dual_elemental);
}
{'fraction_non_alphanumeric': 0.1175925925925926, 'fraction_numerical': 0.003703703703703704, 'mean_word_length': 4.671916010498688, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '652845', 'n_tokens_mistral': 804, 'n_tokens_neox': 777, 'n_words': 120}