Commit Graph

11 Commits

Author SHA1 Message Date
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 c979a4ce04 Clean up fpclassify.h.
Delete code needed by old versions of the NDK. We do not build
with these versions of the NDK and do not use STLPort anymore.

Change-Id: I61092db0aa3980cfae6ff57f3f318482027e627f
2015-02-05 14:47:33 -08: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
Björn Piltz 1df2f0f5d7 Removed MSVC warnings
These are warnings which show up when using Ceres.

Change-Id: Id1f382f46b8a60743f0b12535b5b3cdf46f988e0
2014-05-07 20:56:04 +02:00
Sameer Agarwal 2569076ff0 More NDK fixes.
Fix variable names in port.h and fix fpclassify when
using gnustl. This was tested by switching to gnustl
in the JNI build.

Thanks to Carlos Hernandez for suggesting the gnustl fixes.

Change-Id: I690b73caf495ccc79061f45288e416da1604cc72
2014-04-25 23:55:48 -07:00
Sameer Agarwal 509f68cfe3 Problem::Evaluate implementation.
1. Add Problem::Evaluate and tests.
2. Remove Solver::Summary::initial/final_*
3. Remove Solver::Options::return_* members.
4. Various cpplint cleanups.

Change-Id: I4266de53489896f72d9c6798c5efde6748d68a47
2013-02-24 19:04:21 +00:00
Keir Mierle f21bee2472 Fix for fpclassify.h NDK porting work.
Change-Id: I69df1b4caf2941ed96a53e35e43ec54073f84f59
2012-08-16 17:02:43 -07:00
Keir Mierle 6185db22f8 Fix STLPort fpclassify portability.
Change-Id: I9418c05a160aa635574370c5e35424566781dcb0
2012-08-16 14:22:53 -07:00
Keir Mierle d2a5ab6500 Use C99 macros on Android for fpclassify.h
Change-Id: I7118f05b436afadbff5369ce40d5b9ab95e8a437
2012-07-26 14:31:56 -07:00
Keir Mierle efe7ac60a0 Port Ceres to Windows
This is a preliminary, but full, port of Ceres to Windows.
Currently all tests compile and run, with only system_test
failing to work correctly due to a path issue.

Change-Id: I4152c1588bf51ffd7f4d9401ef9759f5d28c299c
2012-06-24 23:22:04 -07:00
Keir Mierle 58ede2772e Add a portable floating point classification API
Ceres has traditionally battled with portability issues
when trying to classify floating point values as one
type or another. For example, in C99 'isnan' is a
macro. Since it is a macro, it is impossible to
override the name in other namespaces.

Instead of trying to use preprocessor hacks to work
around the issue, define our own set of camel-case
names for use internally and by Ceres clients. For
example do this:

  template<typename T>
  void MyFunction(T x, T y) {
    if (ceres::IsNaN(x)) {
      ...
    }
  }

instead of using "isnan" or "std::isnan". Note that
while GCC and Apple GCC both import 'isnan' into
the std namespace, it is not standard until C++11
which Ceres will not require for some years.

Change-Id: Ibcc96a8bb4ba63aa67cbbc58658b2e5671cd5824
2012-06-24 17:42:53 -07:00