Make all coordinates 4D #10
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This affects a larger chunk of the code but is mainly a matter of extending coordinate vectors and matrices a bit and only selecting the spatial parts of the coordinates in most cases where operations are done on the coordinates. I bit more convoluted but essential.
Typing extending to include both CoordinateMatrix and Matrix, as well as CoordinateVector and Vector. Some matrices and vectors contain coordinates and can be expected to be either Nx4 or 4x1. Other matrices and vectors can be shaped arbitrarily.
In addition to adding support for the fourth dimension, it is now also possible to load source and target data that doesn't have the exact same stations. The intersection of the two sets of coordinates are found by using the station names as key. Consequently, the coordinate lists are now sorted by the station names as well. This ensures that coordinate pairs are placed in the same rows in the matrices used for computation.