Skip to content
This repository has been archived by the owner on Oct 26, 2018. It is now read-only.

Commit

Permalink
Lint cleanup from Jim Roseborough.
Browse files Browse the repository at this point in the history
Change-Id: I53f4e0d020602443b397387b8c5908f25649403d
  • Loading branch information
sandwichmaker committed Apr 30, 2014
1 parent b166806 commit 15c1210
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions internal/ceres/compressed_row_jacobian_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,41 +50,44 @@ class CompressedRowJacobianWriter {
: program_(program) {
}

// `PopulateJacobianRowAndColumnBlockVectors` sets `col_blocks` and
// `row_blocks` for a `CompressedRowSparseMatrix`, based on the parameter
// block sizes and residual sizes respectively from the program. This is
// useful when Solver::Options::use_block_amd = true;
// PopulateJacobianRowAndColumnBlockVectors sets col_blocks and
// row_blocks for a CompressedRowSparseMatrix, based on the
// parameter block sizes and residual sizes respectively from the
// program. This is useful when Solver::Options::use_block_amd =
// true;
//
// This function is static so that it is available to other jacobian
// writers which use `CompressedRowSparseMatrix` (or derived types).
// writers which use CompressedRowSparseMatrix (or derived types).
// (Jacobian writers do not fall under any type hierarchy; they only
// have to provide an interface as specified in program_evaluator.h).
static void PopulateJacobianRowAndColumnBlockVectors(
const Program* program,
CompressedRowSparseMatrix* jacobian);

// It is necessary to determine the order of the jacobian blocks before
// copying them into a `CompressedRowSparseMatrix` (or derived type).
// Just because a cost function uses parameter blocks 1 after 2 in its
// arguments does not mean that the block 1 occurs before block 2 in the
// column layout of the jacobian. Thus, `GetOrderedParameterBlocks`
// determines the order by sorting the jacobian blocks by their position in
// the state vector.
// It is necessary to determine the order of the jacobian blocks
// before copying them into a CompressedRowSparseMatrix (or derived
// type). Just because a cost function uses parameter blocks 1
// after 2 in its arguments does not mean that the block 1 occurs
// before block 2 in the column layout of the jacobian. Thus,
// GetOrderedParameterBlocks determines the order by sorting the
// jacobian blocks by their position in the state vector.
//
// This function is static so that it is available to other jacobian
// writers which use `CompressedRowSparseMatrix` (or derived types).
// writers which use CompressedRowSparseMatrix (or derived types).
// (Jacobian writers do not fall under any type hierarchy; they only
// have to provide an interface as specified in program_evaluator.h).
// have to provide an interface as specified in
// program_evaluator.h).
static void GetOrderedParameterBlocks(
const Program* program,
int residual_id,
vector<pair<int, int> >* evaluated_jacobian_blocks);

// JacobianWriter interface.

// Since the compressed row matrix has different layout than that assumed by
// the cost functions, use scratch space to store the jacobians temporarily
// then copy them over to the larger jacobian in the Write() function.
// Since the compressed row matrix has different layout than that
// assumed by the cost functions, use scratch space to store the
// jacobians temporarily then copy them over to the larger jacobian
// in the Write() function.
ScratchEvaluatePreparer* CreateEvaluatePreparers(int num_threads) {
return ScratchEvaluatePreparer::Create(*program_, num_threads);
}
Expand Down

0 comments on commit 15c1210

Please sign in to comment.