Commit Graph

107 Commits

Author SHA1 Message Date
959617277f coord: use consistent technique for assignment operators 2018-01-16 13:31:37 +11:00
9bb2bdbaba Merge remote-tracking branch 'origin/master' 2018-01-10 17:19:39 +11:00
a0b0863d61 coord: use new template form in ostream operators 2017-11-24 17:19:32 +11:00
a8088d03cd matrix: use vector for the row storage 2017-11-24 17:19:32 +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
34788756d2 build: don't use './' as an include prefix
GCC produces ODR error when including paths of the form './foo' and
'foo' in the same binary. Rather than managing duplication we just
universally pick the absolute form over the relative form.
2017-11-22 16:49:37 +11:00
4050754ab4 preprocessor: use a script to create map/reduce
We need over 300 arguments for some projects and I'm not going to code
that shit by hand.
2017-09-12 14:17:30 +10:00
31afd9dcfd coord/ops: initial stubs for coord::apply 2017-08-28 12:59:06 +10:00
c0df6bf8a2 coord/ops: move make_coord higher for visibility
latter code may require make_coord it should be above most of the
operations.
2017-08-28 12:58:18 +10:00
c4e367e648 coord: use std::size_t over size_t 2017-08-28 12:25:23 +10:00
3799135236 coord: add general vector comparison function 2017-08-27 12:32:00 +10:00
677a0aa4a9 coord/ops: use vector ops for point difference 2017-08-27 12:27:26 +10:00
31652ed3a3 coord/base: add clarifying comment to index assertion 2017-08-27 11:37:52 +10:00
8f216a0a27 coord/base: don't use std::fill in constexpr constructor 2017-08-27 11:37:18 +10:00
3c9dcba2fb coord/ops: add rshift coord operation
shifts each element to the right `num' places and fills the left space
with a constant or elements from another vector.
2017-08-25 13:05:45 +10:00
8b2c1d3fd2 coord/init: make 1-dimension constructor explicit 2017-08-24 17:52:06 +10:00
dba4e673ca coord/ops: add scalar/vector relational operators 2017-08-24 16:25:27 +10:00
efb719b822 coord/base: add indices method 2017-08-24 14:39:54 +10:00
ad345f19d5 coord/base: add restrictions to redim with/out params
redim to lower dimensionality should not allow a parameter, and redim to
higher dimensions should require a fill parameter.
2017-08-24 14:39:54 +10:00
1d4992e3e4 coord/base: add comments for constructors 2017-08-24 14:39:54 +10:00
0b52ef47be coord/ops: make make_foo functions constexpr 2017-08-24 14:39:54 +10:00
84963aacf8 coord/ops: make 'all' and 'any' constexpr 2017-08-24 14:39:54 +10:00
ac19e165ba coord/ops: add comment for util::limit 2017-08-24 12:49:59 +10:00
c49738e7a3 coord/ops: add elementwise limit operation 2017-08-16 17:26:16 +10:00
6c77393a2c coord: make min and max variadic 2017-07-31 16:16:54 +10:00
0016c83dab coord: add the select function 2017-07-31 15:41:57 +10:00
2fad1715cf coord: define make_klass for all coordinate types 2017-07-28 16:08:59 +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
046a369f55 coord: don't use kahan summation for sum(coord)
Our kahan summation algorithm has issues with infinities so we just
avoid using it in coordinates where speed and simplicity are more
important.
2017-06-16 17:38:55 +10:00
061088467f coord: add structured bindings support 2017-06-15 16:32:40 +10:00
ae40b163e5 coord: prefer cbegin/cend where possible 2017-06-13 14:18:00 +10:00
b67a99ee4e coord: add arity query function 2017-03-23 14:36:39 +11:00
e364b0855f coord/store: avoid unused variable on non-sse alignment 2017-01-05 19:50:27 +11:00
abedda1e5d coord/store: abstract SIMD alignment tests 2017-01-05 16:46:01 +11:00
353cf839d4 use nested namespace declarations 2017-01-05 15:06:49 +11:00
3dd80be05a coord: use self-dot-product for norm2 2016-12-21 20:23:43 +11:00
919c635f63 coord/base: assert we are using arithmetic types 2016-10-25 19:57:37 +11:00
e96ef7af32 quaternion: move out of coord infrastructure 2016-10-17 22:30:16 +11:00
2c6011394f coord/ops: assert when normalising zero coords 2016-10-12 22:58:13 +11:00
b7d141322c coord/ops: add logical or, and logical and for bools 2016-09-23 13:39:13 +10:00
109d47e971 coord/ops: generalise vectors hypot function 2016-09-23 13:27:44 +10:00
ff86357b83 coord/ops: use full types for is_coord
rather than passing the template class we pass the fully specified
template; ie point<3,float> rather than point.

this makes it dramatically easier to use is_coord in foreign code at the
cost of making the library code slightly more verbose. we no longer have
to obtain a typedef for the root coord class somehow.
2016-09-22 16:20:32 +10:00
7db82e4b22 coord/base: add cbegin and cend members 2016-09-21 22:23:20 +10:00
2b946510e5 coord/ops: correct last iterators for util::all and util::any 2016-09-21 22:22:52 +10:00
ff7ce2f1ef coord/ops: mod style 2016-09-14 17:42:11 +10:00
fa21e52ee0 coord/ops: add scalar cos/sin 2016-09-14 17:41:59 +10:00
ab89286d5c coord/ops: add scalar mod 2016-09-14 17:38:30 +10:00
f6ceb5cdee coord/ops: add element sum overload 2016-08-15 20:56:10 +10:00
1f3b44a20e vector: move vector::is_zero to coord::almost_zero 2016-08-11 16:33:32 +10:00