Commit Graph

9 Commits

Author SHA1 Message Date
Nikolaus Demmel 7b8f675bfd fix formatting for (non-generated) internal source files
- Change formatting standard to Cpp11. Main difference is not having
  the space between two closing >> for nested templates. We don't
  choose c++14, because older versions of clang-format (version 9
  and earlier) don't know this value yet, and it doesn't make a
  difference in the formatting.
- Apply clang-format to all (non generated) internal source files.
- Manually fix some code sections (clang-format on/off) and c-strings
- Exclude some embedded external files with very different formatting
  (gtest/gmock)
- Add script to format all source files

Change-Id: Ic6cea41575ad6e37c9e136dbce176b0d505dc44d
2020-09-21 02:52:07 +02:00
Sameer Agarwal 4fc5d25f9c Add a missing <cstdint> to block_structure.h
Change-Id: Ic192eb61b87726e5e939a28b00842da4e0f2b30a
2018-08-09 21:47:25 -07:00
Sameer Agarwal e82e128344 Deprecate integral_types.h
This header defined integral types in the pre-C++11 days, and can
be replaced with <cstdint> and the types defined therein.

Also remove a shallow (and incorrect) typedef in include/ceres/types.h

https://github.com/ceres-solver/ceres-solver/issues/409

Change-Id: I398c652f74d24bbeea459672508bf28f591b100f
2018-08-09 12:17:05 -07:00
Sameer Agarwal ef31944726 A number of changes to BlockSparseMatrix.
1. Add BlockSparseMatrix::CreateDiagonalMatrix
2. Add BlockSparseMatrix::AppendRows
3. Add BlockSparseMatrix::DeleteRowBlocks
4. Add BlockSparseMatrix::CreateRandomMatrix
5. Add a non-default constructor to Compressedlist.

Change-Id: I7cc7656616d059cef4471335f6d5b636807953e6
2017-06-14 10:57:27 -07:00
Keir Mierle 7492b0d8de Update copyright headers with new year and URL
Since Ceres is moving to using GitHub for issues, and the Google
Code URL in the current copyright header will soon become invalid,
update all the headers.

Change-Id: I1fce70375d1bcf098591f07b4d8f01a5c1e0789c
2015-03-18 05:43:23 +00:00
Sameer Agarwal bcc865f81c Remove using namespace std;
For historical reasons we had a "using namespace std;" in port.h. This
is generally a bad idea. So removing it and along the way doing a bunch
of cpplint cleanup.

Change-Id: Ia125601a55ae62695e247fb0250df4c6f86c46c6
2015-01-07 14:26:53 -08:00
Sameer Agarwal 46ccfb376a Cleanup block_structure.h/cc
1. Remove obsolete Proto conversion functions.
2. Fix a strict weak ordering bug.

Change-Id: I1ce6d4b06e29cf475df1d5bd37c79f66f20f8d93
2014-04-12 21:58:11 -07:00
Sameer Agarwal 85561eee95 Use int32 for parameter block sizes.
CostFunction now uses int32 instead of int16
to store the size of its parameter blocks.

This is an API breaking change.

Change-Id: I032ea583bc7ea4b3009be25d23a3be143749c73e
2014-01-07 22:22:14 -08:00
Keir Mierle 8ebb073038 Initial commit of Ceres Solver. 2012-04-30 23:09:08 -07:00