20200112

Spare concern re-examination of information

Data-driven method

ML

Two weeks summary

Andrew Ng completion of the course has been regarded as relatively good, not enough time
to ensure the quality of the course CPP, particularly projects related to solid knowledge
there is spare capacity can continue to learn math, especially probability theory courses, courses related to algebra Andrew Ng also complement

Back-propagation algorithm

The relevant part of the reference depth learning courses

Preview multiple inheritance

Polymorphic:

Features virtual functions: defining and override the base class / derived class
non-member / static / inline / construction / friend can not set virtual function
derived class Kaki list of classes / class derivation list when you define
without declaration

Access to virtual functions:

Pointer: Non-virtual function pointer type determines
the virtual function is determined referring to the object type

Quote: Similar pointer
but once you declare a variable changes do not alter the calling function

Construction and destructor:
the priority call functions in this class, the base class is invoked secondary function, derived classes do not call other functions

Pure virtual function

Declared only in the base class, and add ** ** = 0, called an abstract base class, the base class object can create an abstract
derived class must define each given

Another way abstract class: protected all constructors

The destructor is generally defined as a virtual function

Overload: occur in the same class, the same function name, but different types of parameters, number, sequence.

Cover: occurs in the parent-child class virtual function of the same name, the parameters are also identical. (Data members have the same name hidden)

Hidden: occurs in the parent-child class, refers in some cases, the derived class with the same name in the shielding function in the base class.

Dalkey derive conclusions:
multiple inheritance (with virtual functions)

  1. Each has its own base class virtual function table
  2. If the derived class has its own virtual functions, it will be added into the first virtual function table
  3. Covering the base class virtual function, only the first virtual function table stored in the real address of the function to be covered; not real address corresponding to the virtual functions of other virtual function table stored in, but only one hop turn instructions

Virtual base class

// 结论一:单个虚继承,不带虚函数 
// 虚继承与继承的区别
// 1. 多了一个虚基指针 
// 2. 虚基类位于派生类存储空间的最末尾

// 结论二:单个虚继承,带虚函数 
// 1. 如果派生类没有自己的虚函数,此时派生类对象不会产生虚函数指针 
// 2. 如果派生类拥有自己的虚函数,此时派生类对象就会产生自己本身的虚函数指针,
//	  并且该虚函数指针位于派生类对象存储空间的开始位置

Multiple inheritance and virtual inheritance object model more complex object model single inheritance, resulting in inefficient member access, in two ways: when the object constructor set vptr many times, and this
adjustment pointer.

Shutdown
https://blog.csdn.net/heibaikong6/article/details/95865721

Released eight original articles · won praise 0 · Views 115

Guess you like

Origin blog.csdn.net/weixin_44323639/article/details/103943111