vector - vector product
the inner product
Givens two vectors \(x,y\in \mathbb{R}^n\), the quantity \(x^\top y\), sometimes called the inner product or dot product of the vectors, is a real number given by:
\[x^\top y=\begin{bmatrix}x_1 , x_2 ,\cdots ,x_n \end{bmatrix}\begin{bmatrix}y_1 \\ y_2 \\ \vdots \\ y_n\end{bmatrix}=\sum_{i=1}^n x_iy_i\]
the inner products are reaully just special case of matrix multiplication.
the outer product
Given vectors \(x\in\mathbb{R}^m,y\in \mathbb{R}^n\)(not necessarily of the same size), \(xy^\top\in\mathbb{R}^{m\times n}\) is called the outer product of the vectors, It is a matrix whose entries are given by \((xy^\top)_{ij}=x_i y_i\) ,i.e.,
\[x y^\top=\begin{bmatrix}x_1 \\ x_2 \\\vdots \\x_m \end{bmatrix}\begin{bmatrix}y_1, y_2, \cdots, y_n\end{bmatrix}=\begin{bmatrix}x_1 y_1, x_1 y_2,\cdots x_1 y_n\\
x_2 y_1, x_2 y_2, \cdots, x_2 y_n\\ \cdots, \cdots, \cdots ,\cdots\\
x_m y_1,x_m y_2, \cdots, x_m y_n\end{bmatrix}\]
vector - vector product的更多相关文章
- vector< vector<int> >类似于二维数组
vector< vector<int> > intVV; vector<int> intV; int i,j; ;i<;++i){ intV.clear(); ...
- NDK GDB 中打印vector , vector<vector <> >
在android上进行native开发的时候,我们需要用NDK-GDB 对native code进行调试,其中很麻烦的是,我使用的NDK版本是4.0,该版本还不支持用NDK-GDB直接打印vector ...
- 对多维向量vector<vector<int> > vec进行操作
直接写作vector<vector<int> > vec在VC++6.0下编译不过改做: typedef std::vector<int> ROW; s ...
- 2016.6.24——vector<vector<int>>【Binary Tree Level Order Traversal】
Binary Tree Level Order Traversal 本题收获: 1.vector<vector<int>>的用法 vector<vector<int ...
- vector vector int 初始化
方法一: vector<vector<int>>array=(2,vector<int>()); array[0].push_back(1); array[i].p ...
- vector<vector<int>> 使用简单示例
#include <iostream> #include <vector> using namespace std; int main() { vector<vector ...
- 由jtable浅谈vector<vector<Object>>的用法(转自a718515028的专栏)
以前只用过vector<Object> ,但是在做从数据库导出数据放到jtable中时,发现还有个vector<vector<Object>>的用法. 先说jta ...
- 关于C++中vector<vector<int> >的使用
1.定义 vector<vector<int>> A;//错误的定义方式 vector<vector<int> > A;//正确的定义方式 2.插入元素 ...
- C++ sort vector<vector<int> > or vector<MyClass> 容器的排序
C++的STL中提供了很强大的排序函数sort,可以对任意数组,结构体及类进行排序,下面我们先来看最简单的数组排序.默认的升序排列,我们也可以在后面加上less或greater来告诉编译器我们想要的排 ...
随机推荐
- JavaScript学习笔记4之 ByClass&json
一.通过class获取标签 var out=document.getElementsByClassName(‘out’);IE 6 7 8 不支持 getElementsName 是否有办法既能通过c ...
- RMI(远程接口调用)
1. RMI的原理: RMI系统结构,在客户端和服务器端都有几层结构. 方法调用从客户对象经占位程序(Stub).远程引用层(Remote Reference Layer)和传输层(Transport ...
- Java基础知识【上】(转载)
http://blog.csdn.net/silentbalanceyh/article/details/4608272 (最终还是决定重新写一份Java基础相关的内容,原来因为在写这一个章节的时候没 ...
- 常见排序算法(附java代码)
常见排序算法与java实现 一.选择排序(SelectSort) 基本原理:对于给定的一组记录,经过第一轮比较后得到最小的记录,然后将该记录与第一个记录的位置进行交换:接着对不包括第一个记录以外的其他 ...
- 初试WIX加SQL LocalDB
最近有个项目需要生成一个自动打包安装App和数据库的MSI文件,经同事推荐WIX,于是乎就试了一试.遇到了一些问题觉得有分享的价值,所以写篇博客记录一下 :) 使用感觉: WIX特点:功能很强大,用X ...
- 优化SQLServer--表和索引的分区(二)
简介 之前一篇简单的介绍了语法和一些基本的概念,隔了一段时间,觉得有必要细致的通过实例来总结一下这部分内容.如之前所说,分区就是讲大型的对象(表)分成更小的块来管理,基本单位是行.这也就产生了很大优势 ...
- 基于mysql的数据管理
准备工作 注意 mysqldump.exe是MySQL数据库服务器的导出数据工具(登录对应mysql.exe) 1.数据备份 将数据库服务器中的数据保存在本地的SQL文件中 语法 mysqldum ...
- Appium python API 总结
Appium python api 根据testerhome的文章,再补充一些文章里面没有提及的API [TOC] [1]find element driver 的方法 注意:这几个方法只能通过sel ...
- C++函数指针总结
学习c++的过程中,指针是难点,熟悉了指针之后,还有一个让人很蛋疼的难点,那就是函数指针了.本博文详细介绍一下常见的各种坑爹的函数指针. 至于指针的详细学习,推荐这篇博文C++指针详解 与数据一样,函 ...
- 2-SAT
n个布尔变量,满足m个如 A为x或B为y的限制 建一个点拆成两个,分别表示选TRUE或FALSE 建立A的!x B的y 的连边 与 A的x B的!y 的连边 每次dfs. 若一个点在之前条件下无论 ...