⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vector.hpp

📁 面向对象的卡尔曼滤波器源码
💻 HPP
字号:
// vector.hpp// A vector definition	 for real or complex vector // adds Linear Algebra operations to BasicArray//                      (c) Copyright 1995, Everett F. Carter Jr.//                      Permission is granted by the author to use//			this software for any application provided this//			copyright notice is preserved.// rcsid: $Id$  @(#)vector.hpp	1.12 10:24:33 5/11/95  EFC#ifndef VECTOR_HPP_#define VECTOR_HPP_ 1.12#include <math.h>#include <barray.hpp>#include <bool.h>class Vector : public BasicArray{	protected:	  static ostream* ostr;	public:	  const int& rows;	  Vector() : BasicArray(1), rows(sze) {}	  Vector(const int r) : BasicArray(r), rows(sze) {}	  Vector(const Vector& v) : BasicArray(v), rows(sze)  {}	  Vector(const BasicArray& v) : BasicArray(v), rows(sze)  {}	  virtual ~Vector() {}	Vector& operator=(const Vector& v);	Vector& operator=(const BasicArray& v);	Vector& operator+=(const Vector&);	Vector& operator-=(const Vector&);	friend Vector operator+(const Vector&, const Vector&);	    // Vector+Vector	friend Vector operator-(const Vector&, const Vector&);	    // Vector-Vector	friend scalar_type operator*(const Vector&,const Vector&);  // Vector*Vector	 // Vector*scalar	friend Vector operator*(const Vector& v, const double d);#ifdef COMPLEX	friend Vector operator*(const Vector& v, const Complex d);#endif	// scalar*Vector	friend Vector operator*(const scalar_type d,const Vector& v)			{ return v * d; }	// scalar assignment	scalar_type operator=(const scalar_type d);	friend bool operator==(const Vector&,const Vector&);	// equality	// attach the output stream for error messages,	// (cerr is used if this is not ever used)          static void attach(ostream& os)  	{ ostr = &os; }};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -