VS
4月16!
平时记录用,不喜忽喷
展开
-
std::vector 转 / 数组 / 转 / Eigen::Matrix
数据类型转化原创 2022-07-14 17:34:23 · 3229 阅读 · 0 评论 -
指针数据 传进 数组,vector,valarray
数据转化原创 2022-07-07 16:30:44 · 308 阅读 · 0 评论 -
onnxruntime cuda
#include <onnxruntime_cxx_api.h>#include <onnxruntime_c_api.h>#include <cuda_provider_factory.h>#include <iostream>#include <vector>struct MNIST { MNIST() { env = Ort::Env(ORT_LOGGING_LEVEL_VERBOSE, "test.原创 2021-12-02 15:45:56 · 1602 阅读 · 0 评论 -
获取文件夹下所有的.lib文件名
cd filename关键命令:dir /b *.lib>1.txt原创 2021-11-24 14:27:34 · 913 阅读 · 0 评论 -
vs 删除不要的库文件、lib等信息
VS中删除以前增加的库文件_程序猿的视界-CSDN博客_vs删除库目根据需求要添加新的库到VS中方法1:项目->属性->C/C++->附加包含目录:填写附加头文件所在目录 ,分号间隔多项项目->属性->链接器->附加库目录:填写附加依赖库所在目录分号间隔多项项目->属性->链接器(点前面的+展开)->输入->附加依赖项:填写附加依赖库的名字.lib空格间隔多项方法二:创建属性表,每次创建工程后在属性管理器中Debug|win32下添https:..原创 2021-11-23 15:05:13 · 2259 阅读 · 0 评论 -
vs 读/写txt文件内的数据
du'sh std::vector<int> data; std::ifstream myfile(tt.txt"); int uu = 0; if (!myfile.is_open()) { std::cout << "can not open this file" << std::endl; return 0; } while (myfile.good() &&am.原创 2021-06-03 10:53:26 · 2203 阅读 · 0 评论 -
检测vector是否有交集
#include <iostream> // std::cout#include <algorithm> // std::find_if#include <vector> // std::vectorauto test(const std::vector< itk::Index<3>>& va, const std::vector< itk::Index<3>>& vb)..转载 2021-03-27 10:41:18 · 306 阅读 · 0 评论 -
牛顿法解多项式的根
给个初值,用牛顿法解多项式的根;#include<iostream>#include<math.h>#include<vector>using namespace std;struct Newton {public: double ini_para; // 最高n次,系数列表,初值 double resultNewton(int n,std::vector<double> coffer,d...原创 2021-03-01 11:48:39 · 369 阅读 · 0 评论 -
空间点到空间直线的垂点计算
有一个参考的博客,大家搜一下就可以找到,这是我用到的用eigen库的 //pt 空间外一点//begin-end 直线上的两个点Eigen::Vector3d GetFootOfPerpendicular(const Eigen::Vector3d &pt, const Eigen::Vector3d &begin, const Eigen::Vector3d &end) //pt:point outside line { a.原创 2020-11-24 17:20:55 · 1098 阅读 · 2 评论 -
从旋转向量到旋转矩阵的转化公式
这个博客是公式详解:https://www.cnblogs.com/xpvincent/archive/2013/02/15/2912836.html Eigen::Matrix3d constructMatrix(Eigen::RowVector4d rotationVector) { double x = rotationVector(0, 0); double y = rotationVector(0, 1); double z...原创 2020-10-22 11:54:18 · 634 阅读 · 0 评论 -
SVD C
q.transpose() = R * p.transpose() + tTemp ; void registerSVD(Eigen::Matrix3d &p, Eigen::Matrix3d &q, Eigen::Matrix3d &R, Eigen::Matrix3d &tTemp) { Eigen::Vector3d pc = p.colwise().mean(); Eigen::Vector3d q...原创 2020-10-22 11:51:16 · 288 阅读 · 0 评论 -
vs2017调用matlab fsolve函数解方程组
参考:https://blog.csdn.net/mikasa3/article/details/89341993第一种engine:if (solveNOZInitialize()) { std::cout << "success" << std::endl; } else { std::cout << "fail" << std::endl; retu.原创 2020-10-20 12:48:46 · 716 阅读 · 0 评论 -
“_ITERATOR_DEBUG_LEVEL“的不匹配项: 值“0“不匹配值“2“
出现这个问题是debug版本下用了release的库文件;找对应库发现:我的库里面已经同时包含.lib d.lib(两个版本都放在一个文件夹下)因为我用的cmake构建的项目,为了在内部补更改链接库设置,我没有采纳网上大多数说的把debug下的d.lib全部拷贝进去下面是这个博客里的解决方法,对我有用:主要是把debug下和release下的属性--C/C++---代码生成---运行库:都设置为多线程DLL(/MD)https://www.cnblogs.com/arxive..原创 2020-10-16 09:33:53 · 699 阅读 · 0 评论 -
Windows boost下载地址
boost下载地址:https://www.boost.org/users/history/任意一个点进去:原创 2020-08-27 11:29:23 · 400 阅读 · 0 评论 -
三维点类Point3D
class Point3D { private: double x, y, z; public: Point3D(double a, double b, double c) { x = a; y = b; z = c; } Point3D(float a, float b, float c) { x = a; y = b; z = c; } void setX(double a) { x = a; } v...原创 2020-07-09 16:57:45 · 2844 阅读 · 0 评论 -
VS 读、写.csv文件
读csv文件:getline:这里读进来的文件里面存储的数必须是以“空格”为间隔的,否则数读不进来的;保存:保存的时候可以用空格或者逗号都可以,看你需要了,如果这个文件你还要读,那么最好用空格; std::ifstream fin("C://Users//Mloong//Desktop//read.csv"); //open file std::ofstream out_8("C://Users//Mloong//Desktop//write.csv"); //save原创 2020-07-09 16:48:45 · 2042 阅读 · 0 评论 -
C语言 读/写.csv文件
内部csv数据中有负数;涉及C++中的 istringstream 的用法:ifstream fin(fname);int a,b,c;string s;getline(fin, s);istringstream ss(s);ss >> a>>b>>c;//把ss中的三个数赋值给a,b,c#include <iostream>#include <fstream>#include <string>.原创 2020-06-17 15:46:42 · 1920 阅读 · 0 评论 -
cmake+ITK+VTK+vs2017 配置
cmake+ITK+VTK我的环境:系统 Windows10 64位VTK:8.1.2ITK:4.13.2Cmake 3.18.0https://app.yinxiang.com/fx/8a32670c-c8a9-4f15-95fc-eeae299fc407原创 2020-06-12 11:17:02 · 583 阅读 · 0 评论