5#include <stratax/core/dtypes/Concepts.hpp>
6#include <stratax/containers/Matrix.hpp>
7#include <stratax/containers/Tensor.hpp>
8#include <stratax/containers/Vector.hpp>
9#include <stratax/core/Shape.hpp>
11namespace stratax::creation {
24stratax::container::Tensor<T> zeros(
const stratax::core::Shape& shape)
26 return stratax::container::Tensor<T>(shape, T{});
39stratax::container::Vector<T> zeros(std::size_t size)
41 return stratax::container::Vector<T>(size, T{});
56stratax::container::Matrix<T> zeros(std::size_t rows, std::size_t cols)
58 return stratax::container::Matrix<T>(rows, cols, T{});
72stratax::container::Tensor<T> ones(
const stratax::core::Shape& shape)
74 return stratax::container::Tensor<T>(shape, T{1});
87stratax::container::Vector<T> ones(std::size_t size)
89 return stratax::container::Vector<T>(size, T{1});
104stratax::container::Matrix<T> ones(std::size_t rows, std::size_t cols)
106 return stratax::container::Matrix<T>(rows, cols, T{1});
121stratax::container::Tensor<T> full(
const stratax::core::Shape& shape,
const T& value)
123 return stratax::container::Tensor<T>(shape, value);
137stratax::container::Vector<T> full(std::size_t size,
const T& value)
139 return stratax::container::Vector<T>(size, value);
155stratax::container::Matrix<T> full(std::size_t rows, std::size_t cols,
const T& value)
157 return stratax::container::Matrix<T>(rows, cols, value);
175stratax::container::Matrix<T> identity(std::size_t size)
177 stratax::container::Matrix<T> result(size, size, T{});
179 for (std::size_t i = 0; i < size; ++i)