error: “自定义函数XXX” must take exactly one argument

主要问题在于,类里面的重载的二元运算符时,   只需要一个参数,另一个参数由this指针传入,这里如果需要传入两个参数,需要放到类外定义,声明友元(访问私有数据和函数)。

如下:

class myTask{
public:
    myTask(int a, int b):c(a),p(b){}
    //类内重载只需要一个参数,所以需要友元;而不声明友元则无法访问私有成员
    friend bool operator < (const myTask &a1, const myTask& a2);
private:
    int c, p;
};

//去掉friend,否则会报错 error: ‘friend’ used outside of class
bool operator < (const myTask &a1, const myTask& a2){
    return a1.p < a2.p;
}

 

  • 8
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Preface Acknowledgments Chapter 1—Intelligent Control Techniques 1 Introduction 2 Knowledge-Based Systems 3 Neural Networks 3.1 Introduction 3.2 Biological Neuronal Morphology 3.3 Static Neural Networks 3.4 Common Types of Artificial Neural Networks 3.5 Backpropagation Learning Algorithm 4 Fuzzy Logic 4.1 Fuzzy Systems and Rules 4.2 Fuzzy Reasoning and Aggregation 4.3 Fuzzy Control 5 Evolutionary Computing 5.1 GA Searching Algorithm 5.2 GA Selection 5.3 GA Reproduction 6 Summary References Chapter 2—Learning and Adaptation in Complex Dynamic Systems 1 Introduction 2 Systems Identification and Adaptive Control 2.1 Techniques for Systems Identification 2.1.1 Nonparametric methods 2.1.2 Parametric methods 2.2 Adaptive Control 2.2.1 Gain scheduling 2.2.2 Model-referenced adaptive control 2.2.3 Self-tuning regulators 3 Learning Techniques 3.1 Symbolic Learning 3.2 Numerical Learning 4 Artificial Neural Networks 4.1 Multilayer Perceptron 4.2 Kohonen Self-Organizing Network 4.3 Neural Networks as Identification Tools 4.4 Other Applications of ANN 5 Summary References Chapter 3—Applications of Evolutionary Algorithms to Control and Design 1 Introduction 1.1 Some Basics 1.2 Types of Evolutionary Algorithms 1.3 Types of Operations 1.3.1 Representation of Chromosomes 1.3.2 Fitness Value 1.3.3 Selection 1.3.4 Recombination and Mutation 1.4 Applications 2 Applications in Control 2.1 Robot Control 2.1.1 Planning of Joint Configuration of Manipulators 2.1.2 Acquisition of Behavior Rules of Autonomous Mobile Robots 2.2 Communication System Control 3 Applications in Design 3.1 Circuit Design 3.2 Graphics Design 3.2.1 Interactive EA Approach 3.2.2 Fitness Estimation in Interactive Approach 3.3 Music Design 3.3.1 Sound Synthesis 3.3.2 Algorithmic Composition 4 Other Applications 5 Summary References Chapter 4—Neural Control Systems and Applications 1 Introduction 2 Artificial Neural Networks (ANN) 2.1 The Backpropagation Network (BPN) 2.2 Kohonen Networks 2.3 Counterpropagation Networks 2.4 Hebbian Networks 2.5 Radial Basis Function Networks 2.6 Hopfield Networks 3 Neural Modeling and Identification 4 Neurocontroller-Design Methods 4.1 Supervised Control 4.2 Direct Inverse Control 4.3 Neural Adaptive Control 4.4 Backpropagation Through Time 4.5 Reinforcement Learning Control 4.6 Hybrid Control 5 Hardware and Software for ANN 6 Modular Neural-Visual Servo Control System 6.1 Introduction 6.2 Modular Neural-Control System 6.2.1 Control Networks 6.2.2 Decision Networks 6.3 Evaluation System 6.4 Preliminary Results 6.5 Conclusion 7 Summary References Chapter 5—Feature Space Neural Filters and Controllers 1 Introduction 2 Feature Space Filtering Using Neural Networks 2.1 Adaptive Signal Processing for Pattern Recognition 2.2 General Structure of the FSF System 2.3 A FSF Architecture Using Adaptive Linear Combiner Filter and Radial Basis Function Network Feature Extractor 2.3.1 FSF Realization 2.3.2 ALC-RBF FSF System Learning 2.3.3 Image Contour Enhancement and Recognition Optimization Using ALC-RBF FSF System 2.3.4 Discussion 2.4 FSF Architecture Using Multilayer Perceptron Filter and Principal Component Analysis Network Feature Extractor 2.4.1 MLP-PCA FSF System Realization 2.4.2 Learning in MLP-PCA FSF System 2.4.3 Example of MLP-PCA Feature Space System in Signal Filtering 2.4.4 Discussion 2.5 Concluding Remarks 3 Feature Space Identification and Control Schemes Using Neural Networks 3.1 Feature Space Neural Identification Topologies 3.2 Feature Space Neural Control Topologies 3.2.1 Data Versus Feature Space Neural Control Topologies 3.2.2 Feature Space Control Example 3.2.3 Identification Neural Network 3.2.3.1 Feature Extractor 3.2.3.2 Control Network 3.3 Discussion and Concluding Remarks 4 Summary References Chapter 6—Discrete-Time Neural Network Control of Nonlinear Systems 1 Introduction 2 Background 2.1 Neural Networks 2.2 Advantage of NN Over Adaptive Controllers 2.3 Stability of Dynamical Systems 2.4 MIMO Dynamical Systems 2.5 Tracking Problem 3 Neural Network Controller Design 3.1 NN Controller Structure and Error System 3.2 Well-Defined Control Problem 3.3 Proposed Controller 3.4 Weight Updates for Guaranteed Performance 4 Passivity of Dynamical Systems 4.1 Passive Systems 4.2 Passivity of the Closed-loop System and NN 5 Simulation Results 6 Summary References Chapter 7—Robust Adaptive Control of Robots Based on Static Neural Networks 1 Introduction 2 Notation 2.1 Permutation Operator “⊗” 2.2 GL Product Operator “•” 3 Neural Network Approximation 4 Lagrange-Euler Formulation of Robots 5 Dynamic Modeling of Robots Using Neural Networks 6 Controller Design 7 Case Study 7.1 Trajectory Planning 7.2 Simulation Settings 7.3 Non-Adaptive Control 7.4 Adaptive Control 8 Summary References Chapter 8—Error Correction Using Fuzzy Logic in Vehicle Load Measurement 1 Introduction 2 Vehicle Load Indicator 3 Describing Vehicle Loading States 4 Fuzzy Reasoning 5 Simulation Experiment 6 Summary References Chapter 9—Intelligent Control of Air Conditioning Systems 1 Fuzzy Controlled Air Conditioning System for Energy Conservation Applied to the Synthetic Fiber Plant 1.1 Introduction 1.2 Role and Problems of Air Conditioning Equipment in Synthetic Fiber Plant 1.2.1 Role of Air Conditioners in Spinning and Drawing/Twisting Processes 1.2.2 Problems of Air Conditioners in Spinning and Drawing/Twisting Processes 1.3 Fuzzy-Controlled Air Conditioning System for Energy Conservation 1.4 Results 1.5 Future Directions 1.6 Acknowledgment 2 A Learning Type Fuzzy Logic Control for Stabilizing Temperature and Humidity in a Clean Room 2.1 Introduction 2.2 Ordinary Fuzzy Logic Control System 2.3 A Learning Type Fuzzy Logic Control System 2.3.1 Structure of a Hierarchical Fuzzy Model 2.3.2 Succession of the Ordinary Fuzzy Model 2.4 Simulation Experiments 2.5 Practical Results 2.6 Conclusion 3 Occupant Condition Detecting Algorithm for Air Conditioning Systems 3.1 Introduction 3.2 Structure of the Pyroelectric Infrared Rays Detector 3.3 Segmentation of Occupants from Thermal Images 3.3.1 Removing Background Using the Fuzzy C-Means Algorithm 3.3.2 Identifying the Number of Occupants 3.3.3 Region Growing Algorithm 3.4 Method to Locate Occupants 3.4.1 Estimating the Distance Between the Sensor and Occupants 3.4.2 Experimental Results 3.5 Conclusion References Chapter 10—Intelligent Automation Systems at Petroleum Plants in Transient State 1 PID Controller Using Neuro-Fuzzy Hierarchical System in Feed Oil Switching 1.1 Introduction 1.2 Process Description 1.3 Control Problems in Feed Oil Switching 1.4 Neuro-Fuzzy Hierarchical Control System 1.4.1 Prediction Function 1.4.2 Correction Function 1.5 Control Algorithm 1.6 Results 1.7 Conclusion 2 Fuzzy Control System in Pump Start-up 2.1 Introduction 2.2 Outline of Pump Start-up Operation 2.3 Problems to Automate by Conventional Controller 2.3.1 Ramp controller 2.3.2 PID controller 2.4 Fuzzy Controller 2.4.1 Input Variable and Output Variable 2.4.2 Fuzzy Control Rules 2.5 Results 2.6 Conclusion 3 Fuzzy-PID Hybrid Control System in Feed Property Changing 3.1 Introduction 3.2 Process Description 3.3 Control Problems 3.4 Fuzzy-PID Hybrid Control System 3.5 Parameter Tuning 3.6 Results 3.7 Conclusion References Chapter 11—Intelligent Control for Ultrasonic Motor Drive 1 Introduction 2 Ultrasonic Motor Drive 2.1 The Equivalent Model of the USM 2.2 The Driving Circuit for the USM 3 Fuzzy Model-Following Control 4 Neural Network Model-Following Control 4.1 Description of the Neural Network 4.2 On-Line Learning Algorithm 5 Fuzzy Neural Network Model-Following Control 5.1 Description of the Fuzzy Neural Network 5.2 On-Line Learning Algorithm 6 The PC-Based Ultrasonic Motor Drive 7 Experimental Results 7.1 Fuzzy Model-Following Control 7.2 Neural Network Model-Following Control 7.3 Fuzzy Neural Network Model-Following Control 8 Summary References Chapter 12—Intelligent Automation of Herring Roe Grading 1 Introduction 2 Herring Roe Grading Process 2.1 Pre-Extraction Stage 2.2 Main Grading 2.3 Price Negotiation 3 Grading Technology 3.1 Shape Analysis 3.2 Ultrasonic Echo Imaging for Firmness Measurement 3.3 Vision-Based Weight Estimation 3.4 Color Grading 3.5 Fuzzy Decision-Making System 4 Prototype Development 4.1 Conveyor System 4.2 Ejection Mechanism 4.3 Sensory System 4.4 Prototype Control System 5 Prototype Testing 5.1 Laboratory Experiments 5.2 On-Site Production Test 5.3 Performance Evaluation and Possible Improvements 6 Summary Acknowledgment References Chapter 13—Intelligent Techniques for Vehicle Driving Assistance 1 Introduction 2 Multisensor Data Fusion 2.1 Introduction 2.2 Sensors 2.2.1 Static Environment 2.2.2 Dynamic Environment 2.3 Temporal Data Fusion 2.3.1 The Static Environment Perception 2.3.2 The Dynamic Environment Perception 2.3.2.1 Definition of the sensor and global maps 2.3.2.2 The different steps of the filtering operation 2.3.2.3 Reliability definition 2.3.3 The Copilot Mapping 2.4 Conclusion 3 Vehicle Modeling for Supervision of Manoeuvres 3.1 Introduction 3.2 Supervision of Manoeuvres 3.3 Situation Analysis 3.3.1 The Dynamic Model of the Vehicle 3.3.2 Vehicle Following 3.3.3 Highway Access Manoeuvre 3.3.4 A Lane-Changing Manoeuvre 3.4 Manoeuvre Monitor 3.5 Danger Controller 3.6 Requests Generation and Sensors Planning 3.7 The Driver Information Level 3.8 Conclusion 4 On-Board Real-Time Expert System for Control of the Vehicle 4.1 Introduction 4.2 Development of an Expert System for Control 4.2.1 Building the Knowledge Base 4.2.2 Basic Functioning of the Expert System for Control 4.3 Development of the Real-Time Expert System 4.3.1 Integration of the Expert System in the Real-Time Environment 4.3.2 Asynchronous Data Flows 4.3.3 Control Strategies for the IP 4.3.4 Interrupt Handling 4.3.5 Temporal Reasoning and Multiagent KBS 4.4 Conclusion 5 Summary Notation References Chapter 14—Intelligent Techniques in Air Traffic Management 1 Introduction 1.1 Future Air Navigation Systems (FANS) 1.2 Air Traffic Management 1.3 ATM System Issues for FANS 1.4 Applying AI Technology to ATC 1.4.1 Scheduling and Planning 1.4.2 Agent Technology 2 Intelligent ATC Systems 2.1 OASIS 2.2 COMPAS 2.3 CTAS 3 Intelligent Air Traffic Flow Management 3.1 A Model of Air Traffic Flow Management 3.2 Scheduling for ATFM 3.3 Heuristics 4 The Air Traffic Simulation Test 4.1 Interactive Plan Steering Architecture 4.2 AirTFM - the ATFM Test 5 Real-Time Search Algorithm for Air Traffic Flow Management 5.1 Real-Time Search Algorithms 5.1.1 Real-Time Planning and Scheduling Algorithms 5.1.2 Real-Time Monitoring and Control Algorithms 5.2 Time-Dependent Heuristic Search (TDHS) 5.3 Complexity Analysis of TDHS 5.4 Time-Dependent Cost Function 5.5 Experimental Results on TDHS 5.5.1 The Traveling Salesperson Problem 5.5.2 Base Performance of Heuristics 5.5.3 Results of TDHS on TSP 6 Summary References Index Copyright © CRC Press LLC

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值