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

Commit

Permalink
Cleanup block_structure.h/cc
Browse files Browse the repository at this point in the history
1. Remove obsolete Proto conversion functions.
2. Fix a strict weak ordering bug.

Change-Id: I1ce6d4b06e29cf475df1d5bd37c79f66f20f8d93
  • Loading branch information
sandwichmaker committed Apr 13, 2014
1 parent 7d489fd commit 46ccfb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
3 changes: 3 additions & 0 deletions internal/ceres/block_structure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ namespace ceres {
namespace internal {

bool CellLessThan(const Cell& lhs, const Cell& rhs) {
if (lhs.block_id == rhs.block_id) {
return (lhs.position < rhs.position);
}
return (lhs.block_id < rhs.block_id);
}

Expand Down
12 changes: 0 additions & 12 deletions internal/ceres/block_structure.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
namespace ceres {
namespace internal {

class BlockStructureProto;

typedef int32 BlockSize;

struct Block {
Expand Down Expand Up @@ -89,16 +87,6 @@ struct CompressedColumnBlockStructure {
vector<CompressedColumn> cols;
};

// Deserialize the given block structure proto to the given block structure.
// Destroys previous contents of block_structure.
void ProtoToBlockStructure(const BlockStructureProto &proto,
CompressedRowBlockStructure *block_structure);

// Serialize the given block structure to the given proto. Destroys previous
// contents of proto.
void BlockStructureToProto(const CompressedRowBlockStructure &block_structure,
BlockStructureProto *proto);

} // namespace internal
} // namespace ceres

Expand Down

0 comments on commit 46ccfb3

Please sign in to comment.