//#####################################################################
// Copyright 2019, Craig Schroeder.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
#include <Core/Matrices/FRAME.h>
#include <Core/Math_Tools/RANGE.h>
#include <Core/Random_Numbers/RANDOM_NUMBERS.h>
#include <Core/Read_Write/READ_WRITE.h>
#include <Core/Symbolics/SYMBOLIC.h>
namespace PhysBAM{
//#####################################################################
// Function Fill_Uniform
//#####################################################################
template<class TV> void FRAME<TV>::
Fill_Uniform(RANDOM_NUMBERS<T>& rand,const RANGE<TV>& box)
{
    rand.Fill_Uniform(t,box.min_corner,box.max_corner);
    rand.Fill_Uniform(r);
}
//#####################################################################
// Function Read
//#####################################################################
template<class TV> template<class RW> void FRAME<TV>::
Read(UNTYPED_ISTREAM<RW>& input)
{
    Read_Binary_Group(input,t,r);
}
//#####################################################################
// Function Write
//#####################################################################
template<class TV> template<class RW> void FRAME<TV>::
Write(UNTYPED_OSTREAM<RW>& output) const
{
    Write_Binary_Group(output,t,r);
}
template void FRAME<VECTOR<double,1> >::Read(UNTYPED_ISTREAM<char>&);
template void FRAME<VECTOR<double,1> >::Read(UNTYPED_ISTREAM<double>&);
template void FRAME<VECTOR<double,1> >::Read(UNTYPED_ISTREAM<float>&);
template void FRAME<VECTOR<double,1> >::Write(UNTYPED_OSTREAM<char>&) const;
template void FRAME<VECTOR<double,1> >::Write(UNTYPED_OSTREAM<double>&) const;
template void FRAME<VECTOR<double,1> >::Write(UNTYPED_OSTREAM<float>&) const;
template void FRAME<VECTOR<double,2> >::Read(UNTYPED_ISTREAM<char>&);
template void FRAME<VECTOR<double,2> >::Read(UNTYPED_ISTREAM<double>&);
template void FRAME<VECTOR<double,2> >::Read(UNTYPED_ISTREAM<float>&);
template void FRAME<VECTOR<double,2> >::Write(UNTYPED_OSTREAM<char>&) const;
template void FRAME<VECTOR<double,2> >::Write(UNTYPED_OSTREAM<double>&) const;
template void FRAME<VECTOR<double,2> >::Write(UNTYPED_OSTREAM<float>&) const;
template void FRAME<VECTOR<double,3> >::Read(UNTYPED_ISTREAM<char>&);
template void FRAME<VECTOR<double,3> >::Read(UNTYPED_ISTREAM<double>&);
template void FRAME<VECTOR<double,3> >::Read(UNTYPED_ISTREAM<float>&);
template void FRAME<VECTOR<double,3> >::Write(UNTYPED_OSTREAM<char>&) const;
template void FRAME<VECTOR<double,3> >::Write(UNTYPED_OSTREAM<double>&) const;
template void FRAME<VECTOR<double,3> >::Write(UNTYPED_OSTREAM<float>&) const;
template void FRAME<VECTOR<float,1> >::Read(UNTYPED_ISTREAM<char>&);
template void FRAME<VECTOR<float,1> >::Read(UNTYPED_ISTREAM<double>&);
template void FRAME<VECTOR<float,1> >::Read(UNTYPED_ISTREAM<float>&);
template void FRAME<VECTOR<float,1> >::Write(UNTYPED_OSTREAM<char>&) const;
template void FRAME<VECTOR<float,1> >::Write(UNTYPED_OSTREAM<double>&) const;
template void FRAME<VECTOR<float,1> >::Write(UNTYPED_OSTREAM<float>&) const;
template void FRAME<VECTOR<float,2> >::Read(UNTYPED_ISTREAM<char>&);
template void FRAME<VECTOR<float,2> >::Read(UNTYPED_ISTREAM<double>&);
template void FRAME<VECTOR<float,2> >::Read(UNTYPED_ISTREAM<float>&);
template void FRAME<VECTOR<float,2> >::Write(UNTYPED_OSTREAM<char>&) const;
template void FRAME<VECTOR<float,2> >::Write(UNTYPED_OSTREAM<double>&) const;
template void FRAME<VECTOR<float,2> >::Write(UNTYPED_OSTREAM<float>&) const;
template void FRAME<VECTOR<float,3> >::Read(UNTYPED_ISTREAM<char>&);
template void FRAME<VECTOR<float,3> >::Read(UNTYPED_ISTREAM<double>&);
template void FRAME<VECTOR<float,3> >::Read(UNTYPED_ISTREAM<float>&);
template void FRAME<VECTOR<float,3> >::Write(UNTYPED_OSTREAM<char>&) const;
template void FRAME<VECTOR<float,3> >::Write(UNTYPED_OSTREAM<double>&) const;
template void FRAME<VECTOR<float,3> >::Write(UNTYPED_OSTREAM<float>&) const;
template void FRAME<VECTOR<SYMBOLIC,1> >::Read(UNTYPED_ISTREAM<char>&);
template void FRAME<VECTOR<SYMBOLIC,1> >::Read(UNTYPED_ISTREAM<double>&);
template void FRAME<VECTOR<SYMBOLIC,1> >::Read(UNTYPED_ISTREAM<float>&);
template void FRAME<VECTOR<SYMBOLIC,1> >::Write(UNTYPED_OSTREAM<char>&) const;
template void FRAME<VECTOR<SYMBOLIC,1> >::Write(UNTYPED_OSTREAM<double>&) const;
template void FRAME<VECTOR<SYMBOLIC,1> >::Write(UNTYPED_OSTREAM<float>&) const;
template void FRAME<VECTOR<SYMBOLIC,2> >::Read(UNTYPED_ISTREAM<char>&);
template void FRAME<VECTOR<SYMBOLIC,2> >::Read(UNTYPED_ISTREAM<double>&);
template void FRAME<VECTOR<SYMBOLIC,2> >::Read(UNTYPED_ISTREAM<float>&);
template void FRAME<VECTOR<SYMBOLIC,2> >::Write(UNTYPED_OSTREAM<char>&) const;
template void FRAME<VECTOR<SYMBOLIC,2> >::Write(UNTYPED_OSTREAM<double>&) const;
template void FRAME<VECTOR<SYMBOLIC,2> >::Write(UNTYPED_OSTREAM<float>&) const;
template void FRAME<VECTOR<SYMBOLIC,3> >::Read(UNTYPED_ISTREAM<char>&);
template void FRAME<VECTOR<SYMBOLIC,3> >::Read(UNTYPED_ISTREAM<double>&);
template void FRAME<VECTOR<SYMBOLIC,3> >::Read(UNTYPED_ISTREAM<float>&);
template void FRAME<VECTOR<SYMBOLIC,3> >::Write(UNTYPED_OSTREAM<char>&) const;
template void FRAME<VECTOR<SYMBOLIC,3> >::Write(UNTYPED_OSTREAM<double>&) const;
template void FRAME<VECTOR<SYMBOLIC,3> >::Write(UNTYPED_OSTREAM<float>&) const;
template void FRAME<VECTOR<double,1> >::Fill_Uniform(RANDOM_NUMBERS<double>&,RANGE<VECTOR<double,1> > const&);
template void FRAME<VECTOR<double,2> >::Fill_Uniform(RANDOM_NUMBERS<double>&,RANGE<VECTOR<double,2> > const&);
template void FRAME<VECTOR<double,3> >::Fill_Uniform(RANDOM_NUMBERS<double>&,RANGE<VECTOR<double,3> > const&);
template void FRAME<VECTOR<float,1> >::Fill_Uniform(RANDOM_NUMBERS<float>&,RANGE<VECTOR<float,1> > const&);
template void FRAME<VECTOR<float,2> >::Fill_Uniform(RANDOM_NUMBERS<float>&,RANGE<VECTOR<float,2> > const&);
template void FRAME<VECTOR<float,3> >::Fill_Uniform(RANDOM_NUMBERS<float>&,RANGE<VECTOR<float,3> > const&);
}
