Leader-Following Consensus for a Class of Nonlinear Multiagent Systems Under Event-Triggered and Edge-Event Triggered Mechanisms