Comment rewrite
This commit is contained in:
+39
-61
@@ -31,74 +31,52 @@
|
||||
* Functions to print out tensors with std::cout << x std::endl;
|
||||
*
|
||||
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
|
||||
#pragma one
|
||||
//---------------------------------------------------------------------------------------------------------------------------
|
||||
// INCLUDE DESCRIPTION
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
#pragma once
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------------
|
||||
// DEFINE DESCRIPTION
|
||||
//---------------------------------------------------------------------------------------------------------------------------
|
||||
#include <tensor/vector.hpp> // for panic::vector
|
||||
#include <tensor/matrix.hpp> // for panic::matrix
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------------
|
||||
// VARIABLE DESCRIPTION
|
||||
//---------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------------
|
||||
// FUNCTION PROTOTYPE
|
||||
//---------------------------------------------------------------------------------------------------------------------------
|
||||
namespace panic{
|
||||
namespace io{
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Function Name : panic::io::print_vector
|
||||
//
|
||||
// Description:
|
||||
// Prints a vector out in the terminal
|
||||
//
|
||||
// Inputs:
|
||||
// v const panic::tensor::uint_vector&
|
||||
// const panic::tensor::int_vector&
|
||||
// const panic::tensor::real_vector&
|
||||
// vector to print
|
||||
//
|
||||
// Outputs:
|
||||
// None.
|
||||
//
|
||||
// Returns:
|
||||
// void
|
||||
//
|
||||
// Notes:
|
||||
// The vector is printed out in square brackets.
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void print_vector(const panic::tensor::uint_vector& v);
|
||||
void print_vector(const panic::tensor::int_vector& v);
|
||||
void print_vector(const panic::tensor::real_vector& v);
|
||||
/**
|
||||
* @brief prints out vector to iostream.
|
||||
*
|
||||
* Computes:
|
||||
* @code
|
||||
* print_vector(a)
|
||||
* @endcode
|
||||
*
|
||||
* @tparam T Numeric element type.
|
||||
* @param a Input vector.
|
||||
*
|
||||
* @return true if @p a was successfully printed.
|
||||
* @return false if printing of @p c failed.
|
||||
*
|
||||
* @note N/A
|
||||
*/
|
||||
template <typename T>
|
||||
bool print_vector(const panic::tensor::vector<T>& v);
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
// Function Name : panic::io::print_matrix
|
||||
//
|
||||
// Description:
|
||||
// Prints a matrix out in the terminal
|
||||
//
|
||||
// Inputs:
|
||||
// v const panic::tensor::uint_matrix&
|
||||
// const panic::tensor::int_matrix&
|
||||
// const panic::tensor::real_matrix&
|
||||
// matrix to print
|
||||
//
|
||||
// Outputs:
|
||||
// None.
|
||||
//
|
||||
// Returns:
|
||||
// void
|
||||
//
|
||||
// Notes:
|
||||
// The matrix is printed out in square brackets.
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
void print_matrix(const panic::tensor::uint_matrix& v);
|
||||
void print_matrix(const panic::tensor::int_matrix& v);
|
||||
void print_matrix(const panic::tensor::real_matrix& v);
|
||||
/**
|
||||
* @brief prints out matrix to iostream.
|
||||
*
|
||||
* Computes:
|
||||
* @code
|
||||
* print_matrix(a)
|
||||
* @endcode
|
||||
*
|
||||
* @tparam T Numeric element type.
|
||||
* @param A Input matrix.
|
||||
*
|
||||
* @return true if @p A was successfully printed.
|
||||
* @return false if printing of @p C failed.
|
||||
*
|
||||
* @note N/A
|
||||
*/
|
||||
template <typename T>
|
||||
bool print_matrix(const panic::tensor::matrix<T>& A);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user