/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2010 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /* * Values.cpp * * Created on: Feb 10, 2011 * Author: heber */ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "CodePatterns/MemDebug.hpp" #include "CodePatterns/Assert.hpp" #include "LinearAlgebra/BoxVector.hpp" #include "LinearAlgebra/RealSpaceMatrix.hpp" #include "LinearAlgebra/Vector.hpp" #include "Box.hpp" #include "Values.hpp" Vector VectorValue::toVector() const { Vector returnVector(vector); return returnVector; } BoxVector VectorValue::toBoxVector(Box &_box) const { BoxVector returnVector; static_cast(returnVector) = Vector(vector); // under its hood it's still a Vector ASSERT(_box.isInside(returnVector), "VectorValue::toBoxVector() - vector "+toString(toVector())+" does not lie within box "+toString(_box)+"."); return returnVector; } Box BoxValue::toBox() const { Box returnBox(ReturnFullMatrixforSymmetric(matrix)); return returnBox; }