I am building an application which uses a lot of vectors and for which I am using a lot of third party and system assemblies. The result of this is that I have four ways to to represent 3d double precision vectors, and five ways to represent collections of those vectors. This is true for just about everything I have. The result is that I need to handle 30 different types for about three different actual structures. From your experience, what is the cleanest way to handle this?
If the other systems are providing vector data to your application, and the transfer is just one-way (into your app), then all you have to do is decide how you want to store / handle vectors in your app, and when data comes in simply convert it to that format. The conversion is a one-time thing, and once it's converted you only have the one format to worry about.
(The same architecture can handle two-way interactions - let me cover that last).
This is where Dependency Inversion comes in handy, because you can write different modules where each one is dedicated to work with a specific 3rd party system, and load up the appropriate one at runtime.
Diagram / architecture explained:
So for example:
I put the dependency injection in the main part of the app because ideally it'll be generic and you can reuse it elsewhere.
What about Bi-Directional?
The exact same architecture can be used - as long as your IExternalVectorProvider set-up can re-format data from your standard back to the target 3rd party one.