forked from mpusz/mp-units
refactor: quantity_io added
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
|
||||
#include <units/quantity_io.h>
|
||||
#include "./length.h"
|
||||
#include "./acceleration.h"
|
||||
#include "./density.h"
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <units/physical/si/derived/resistance.h>
|
||||
#include <units/physical/si/base/time.h>
|
||||
#include <units/math.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include "./voltage.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <units/format.h>
|
||||
#include <units/quantity_io.h>
|
||||
|
||||
#include "./length.h"
|
||||
#include "./volume.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "./units_str.h"
|
||||
#include "./length.h"
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
#include "./timer.h"
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <units/physical/si/cgs/derived/speed.h>
|
||||
#include <units/physical/si/international/derived/speed.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <units/physical/si/base/time.h>
|
||||
#include <units/physical/si/derived/volume.h>
|
||||
#include <units/format.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <cassert>
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <units/physical/si/base/time.h>
|
||||
#include <units/physical/si/derived/voltage.h>
|
||||
#include <units/math.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <units/physical/si/typographic/base/length.h>
|
||||
#include <units/physical/si/us/base/length.h>
|
||||
#include <units/physical/si/derived/volume.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <units/physical/si/base/length.h>
|
||||
#include <units/format.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
|
||||
/*
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/quantity.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <units/physical/si/prefixes.h>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <units/physical/si/base/length.h>
|
||||
#include <units/physical/si/derived/energy.h>
|
||||
#include <units/physical/si/derived/torque.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace units;
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <units/format.h>
|
||||
#include <units/physical/si/international/derived/speed.h>
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
|
||||
using namespace units::physical;
|
||||
|
||||
@@ -24,13 +24,14 @@
|
||||
#include <units/physical/si/derived/force.h>
|
||||
#include <units/physical/si/derived/energy.h>
|
||||
#include <units/format.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <linear_algebra.hpp>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
namespace STD_LA {
|
||||
|
||||
template<class ET, class OT>
|
||||
std::ostream& operator<<(std::ostream& os, const std::math::vector<ET, OT>& v)
|
||||
std::ostream& operator<<(std::ostream& os, const vector<ET, OT>& v)
|
||||
{
|
||||
os << "|";
|
||||
for (auto i = 0U; i < v.size(); ++i) {
|
||||
@@ -41,7 +42,7 @@ std::ostream& operator<<(std::ostream& os, const std::math::vector<ET, OT>& v)
|
||||
}
|
||||
|
||||
template<class ET, class OT>
|
||||
std::ostream& operator<<(std::ostream& os, const std::math::matrix<ET, OT>& v)
|
||||
std::ostream& operator<<(std::ostream& os, const matrix<ET, OT>& v)
|
||||
{
|
||||
for (auto i = 0U; i < v.rows(); ++i) {
|
||||
os << "|";
|
||||
@@ -53,6 +54,9 @@ std::ostream& operator<<(std::ostream& os, const std::math::matrix<ET, OT>& v)
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace STD_LA
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace units::physical;
|
||||
using namespace units::physical::si::literals;
|
||||
@@ -345,7 +349,7 @@ void quantity_of_matrix_tests()
|
||||
quantity_of_matrix_divide_by_scalar();
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/physical/si/derived/acceleration.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <cmath>
|
||||
#include <compare>
|
||||
#include <iostream>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <units/physical/si/constants.h>
|
||||
#include <units/math.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
// SOFTWARE.
|
||||
|
||||
#include <units/physical/si/derived/speed.h>
|
||||
#include <units/quantity_io.h>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
|
||||
Reference in New Issue
Block a user