Skip to content

Instantly share code, notes, and snippets.

View waxz's full-sized avatar
🌴
On vacation

wonder waxz

🌴
On vacation
View GitHub Profile
@waxz
waxz / function-argument.cmake
Created May 18, 2024 08:42 — forked from antiagainst/function-argument.cmake
ARGC, ARGV, ARGN, ARGVn in CMake
cmake_minimum_required(VERSION 2.8)
function(use_llvm TARGET)
message("ARGC=\"${ARGC}\"")
message("ARGN=\"${ARGN}\"")
message("ARGV=\"${ARGV}\"")
message("ARGV0=\"${ARGV0}\"")
message("ARGV1=\"${ARGV1}\"")
endfunction()
@waxz
waxz / eigen_boost_serialization.hpp
Created December 25, 2018 05:12 — forked from mtao/eigen_boost_serialization.hpp
Boost serialization for Eigen Matrix and SparseMatrix structures (plus triplets as a helper in SparseMatrix)
/*
Copyright (c) 2015 Michael Tao
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@waxz
waxz / levmarq - Levenberg-Marquardt in plain C
Created July 20, 2018 11:57 — forked from rbabich/ levmarq - Levenberg-Marquardt in plain C
A simple implementation of the Levenberg-Marquardt algorithm in plain C
This file (with a leading space) exists so that the gist has a sensible name, rather than "LICENSE."
@waxz
waxz / Timer.cpp
Created July 18, 2018 03:49 — forked from mcleary/Timer.cpp
C++ Timer using std::chrono
#include <iostream>
#include <chrono>
#include <ctime>
#include <cmath>
class Timer
{
public:
void start()
{
@waxz
waxz / ralign
Created June 6, 2018 15:33 — forked from CarloNicolini/ralign
Umeyama algorithm for absolute orientation problem in Python
"""
RALIGN - Rigid alignment of two sets of points in k-dimensional
Euclidean space. Given two sets of points in
correspondence, this function computes the scaling,
rotation, and translation that define the transform TR
that minimizes the sum of squared errors between TR(X)
and its corresponding points in Y. This routine takes
O(n k^3)-time.
Inputs: