nngn
Loading...
Searching...
No Matches
lua_math.cpp File Reference
#include "lua/function.h"
#include "lua/register.h"
#include "lua/table.h"
#include "lua/utils.h"
#include "hash.h"
#include "lua_vector.h"
#include "math.h"
Include dependency graph for lua_math.cpp:

Namespaces

namespace  anonymous_namespace{lua_math.cpp}
 

Typedefs

using bvec = nngn::lua_vector< std::byte >
 
using fvec = nngn::lua_vector< float >
 

Functions

lua_Integer anonymous_namespace{lua_math.cpp}::hash (std::string_view s)
 
void anonymous_namespace{lua_math.cpp}::gaussian_filter (lua_Integer size, lua_Number std_dev, bvec &v)
 
void anonymous_namespace{lua_math.cpp}::gaussian_filter_f (lua_Integer size, lua_Number std_dev, fvec &v)
 
void anonymous_namespace{lua_math.cpp}::gaussian_filter2d (lua_Integer xsize, lua_Integer ysize, lua_Number std_dev, bvec &v)
 
void anonymous_namespace{lua_math.cpp}::gaussian_filter2d_f (lua_Integer xsize, lua_Integer ysize, lua_Number std_dev, fvec &v)
 
template<auto f, typename ... Args>
auto anonymous_namespace{lua_math.cpp}::vec_fn (nngn::lua::table_view t, Args ...args, nngn::lua::state_view lua)
 
template<typename T , typename D >
void anonymous_namespace{lua_math.cpp}::fill_rnd_vec_common (Math &m, std::size_t off, std::size_t n, std::vector< T > *v)
 
void anonymous_namespace{lua_math.cpp}::fill_rnd_vec (Math &m, lua_Integer off, lua_Integer n, bvec *v)
 
void anonymous_namespace{lua_math.cpp}::fill_rnd_vecf (Math &m, lua_Integer off, lua_Integer n, fvec *v)
 
auto anonymous_namespace{lua_math.cpp}::mat_mul (fvec *dst, const fvec &src0, const fvec &src1, lua_Integer n)
 
void anonymous_namespace{lua_math.cpp}::seed_rand (Math &m, lua_Integer s)
 
auto anonymous_namespace{lua_math.cpp}::rand_float (Math &m)
 
auto anonymous_namespace{lua_math.cpp}::int_dist (std::optional< lua_Integer > v0, std::optional< lua_Integer > v1)
 
auto anonymous_namespace{lua_math.cpp}::rand_int (Math &m, std::optional< lua_Integer > v0, std::optional< lua_Integer > v1)
 
auto anonymous_namespace{lua_math.cpp}::rand_mat (Math &m, lua_Integer n)
 
nngn::lua::table_view anonymous_namespace{lua_math.cpp}::rand_table_common (Math &m, lua_Integer n, auto dist, nngn::lua::state_view lua)
 
nngn::lua::table_view anonymous_namespace{lua_math.cpp}::rand_table (Math &m, lua_Integer n, std::optional< lua_Integer > v0, std::optional< lua_Integer > v1, nngn::lua::state_view lua)
 
nngn::lua::table_view anonymous_namespace{lua_math.cpp}::rand_tablef (Math &m, lua_Integer n, nngn::lua::state_view lua)
 
void anonymous_namespace{lua_math.cpp}::register_math (nngn::lua::table_view t)
 

Typedef Documentation

◆ bvec

using bvec = nngn::lua_vector<std::byte>

◆ fvec