Commit Graph

67 Commits

Author SHA1 Message Date
f6056153e3 rename root namespace from util to cruft
This places, at long last, the core library code into the same namespace
as the extended library code.
2018-08-05 14:42:02 +10:00
803acc9a87 relicense under MPL-2.0 2018-08-04 15:14:06 +10:00
d011c60359 point: add convenience centroid function 2018-04-26 16:30:16 +10:00
eb2b85c4f6 point: add query for furthest pair 2018-04-18 21:48:55 +10:00
76c809f031 point/vector: homog no longer takes a size parameter 2018-04-17 14:26:23 +10:00
f0a05e06e2 point: add forwarding assignment operator 2018-04-16 16:00:32 +10:00
e7a76081e0 point: don't directly iterate over data 2018-04-16 16:00:32 +10:00
24a530e23e maths: remove pow2 function
pow2 has been used enough times to mean 2^x and x^2 that it's not worth
the ambiguity. just use pow(b,e) directly.
2018-04-09 12:30:22 +10:00
ba19aebe88 point/vector: give homog a default dimensionality 2018-03-06 18:13:46 +11:00
0e3fa05f05 build: migrate from ipp files to pure hpp files
ipp files weren't a great way of keeping things clean, and IDEs have a
little trouble dealing with the split configuration. this simplifies
debugging a great deal.
2018-02-28 11:49:13 +11:00
0351313c36 Merge branch 'master' into coord 2017-11-23 17:24:11 +11:00
d3f434b523 coord: make template parameters more flexible
The coordinate system was unable to support types that prohibited
redim or retype operations. Additionally, the `tags' type used for
providing named data parameters was unwiedly.

We remove much of the dependance on template template parameters in the
defined operations and instead define these in terms of a template
specialisation of is_coord.

The tag types were replaced with direct specialisation of the `store'
struct by the primary type, and passing this type through use of the
CRTP.
2017-11-22 17:03:00 +11:00
1f337ef964 point: add min/max convenience methods
these create the smallest/largest expressible coordinates
2017-07-28 14:22:21 +10:00
62491b4cec coord: generalise point hashing for all coord types
move the point hashing function into general coord operations. convert
from using std::hash to something we've made so that we know it's going
to spread the bits a little (unlike the default identity of GCC 7).
2017-06-29 16:33:53 +10:00
08b57c9716 point: add docstrings for distance metrics 2017-05-24 15:15:40 +10:00
f6116eb63e point: prefer constexpr functions over static variables 2016-12-12 17:06:04 +11:00
ec78216813 coord: prefer int/unsigned to intmax/size_t 2016-10-25 17:46:36 +11:00
9a798446b5 build: remove unnecessary includes
discovered with include-what-you-use
2016-10-12 15:08:22 +11:00
7f4cf49931 iterator: use infix_iterator for coord ostream 2016-03-11 12:48:19 +11:00
f7a1ead518 point: remove constexpr from functions relying on cmath 2015-10-06 15:20:06 +11:00
31b59df97a point: add constant sized convenience typedefs 2015-10-06 15:19:06 +11:00
c7637fd627 point: add octile distance function 2015-09-22 18:32:11 +10:00
864cedc257 point: add single dimensional typedefs 2015-09-21 15:26:57 +10:00
21b51a5011 point: make distance metrics constexpr 2015-09-15 21:06:43 +10:00
4ea5896d21 coord: use template typedefs 2015-07-24 01:34:44 +10:00
9b548e56d9 point: convert distance member functions to functions 2015-06-01 15:29:24 +10:00
012f8107c6 point: operate on value types, not references 2015-04-15 14:14:01 +10:00
2658b41ea1 relicence under Apache-2.0 2015-04-13 18:05:28 +10:00
bd88832df3 coord: move cast/redim operations to coord 2015-04-09 17:58:47 +10:00
5428c93b9a coord: pass client class to coord base
allows common typesafe implementation of cast and redim
2015-04-09 17:47:35 +10:00
5627c573eb coord: use size_t/intmax_t for u and i suffixes
size_t matches array indices we are likely to be used in conjuction with
these types.
2015-04-07 16:53:46 +10:00
8a0eee50e3 point: add from function 2015-03-07 03:20:07 +11:00
e461654de8 coord: split coord header into components 2015-03-06 01:46:01 +11:00
99ba406b4d coord: move base coord class into main namespace 2015-03-06 01:16:14 +11:00
439bb19679 coord: move operators out of subclasses 2015-03-06 01:09:58 +11:00
e5d99b3370 coord: use stricter member variable names
use tags for the core coordinate structures to specify what names should
be used for the data variables (in the data union)
2015-03-03 04:11:30 +11:00
6ac02a9920 point: add homogenous redim 2015-02-19 13:29:16 +11:00
049aaf84c9 point: add redim with constant 2015-02-19 13:19:02 +11:00
60f2a7e00d point: add self-division operator 2015-02-19 13:18:28 +11:00
6abfd252d9 coord: move free maths func from point to vector 2015-01-28 14:59:33 +11:00
1b19dadd40 point: add free multiply operator 2015-01-21 23:40:13 +11:00
f64e232201 point: point subtraction should give a vector 2015-01-19 19:14:53 +11:00
319a8ce616 coord: use inherited class for data definitions
keep as many operations centralised in the base coord class as possible.
2015-01-19 19:13:52 +11:00
2210db9c4e point: add a cast method 2015-01-19 13:27:13 +11:00
09f5894d0c point: add scalar division operation 2015-01-15 14:04:51 +11:00
917ab8fc8e point: add redim with fill 2015-01-13 18:41:51 +11:00
64c11bdcb0 point/vector: use coord constructors 2015-01-13 18:41:51 +11:00
dadfe6173e point: add convenience typedef point4f 2015-01-13 18:41:51 +11:00
3d3c1a5f2f build: instantiate templates in declared namespace 2015-01-10 19:40:32 +11:00
7007b76db6 point: add static const member ORIGIN 2015-01-05 18:08:20 +11:00