This documentation is automatically generated by online-judge-tools/verification-helper
 math/linearfunction.cpp
 math/linearfunction.cpp
    
 test/yosupo/dynamic_tree_vertex_set_path_composite.test.cpp
 test/yosupo/dynamic_tree_vertex_set_path_composite.test.cpp
            
         test/yosupo/dynamic_tree_vertex_set_path_composite.toptree.test.cpp
 test/yosupo/dynamic_tree_vertex_set_path_composite.toptree.test.cpp
            
         test/yosupo/point_set_range_composite.test.cpp
 test/yosupo/point_set_range_composite.test.cpp
            
         test/yosupo/queue_operate_all_composite.test.cpp
 test/yosupo/queue_operate_all_composite.test.cpp
            
        #ifndef call_from_test
#include <bits/stdc++.h>
using namespace std;
#endif
//BEGIN CUT HERE
// a * x + b
template<typename T>
struct LinearFunction{
  T a,b;
  LinearFunction():a(0),b(0){}
  LinearFunction(T a,T b):a(a),b(b){}
  using LF = LinearFunction;
  static LF add_identity(){return LF(T(0),T(0));}
  static LF mul_identity(){return LF(T(1),T(0));}
  LF& operator+=(const LF &o){
    a+=o.a;b+=o.b;
    return *this;
  }
  LF& operator*=(const LF &o){
    a=a*o.a;
    b=b*o.a+o.b;
    return *this;
  }
  LF operator+(const LF &o)const{return LF(*this)+=o;}
  LF operator*(const LF &o)const{return LF(*this)*=o;}
  T operator()(T x) const{return a*x+b;}
};
//END CUT HERE
#ifndef call_from_test
//INSERT ABOVE HERE
signed main(){
  return 0;
}
#endif#line 1 "math/linearfunction.cpp"
#include <bits/stdc++.h>
using namespace std;
#endif
//BEGIN CUT HERE
// a * x + b
template<typename T>
struct LinearFunction{
  T a,b;
  LinearFunction():a(0),b(0){}
  LinearFunction(T a,T b):a(a),b(b){}
  using LF = LinearFunction;
  static LF add_identity(){return LF(T(0),T(0));}
  static LF mul_identity(){return LF(T(1),T(0));}
  LF& operator+=(const LF &o){
    a+=o.a;b+=o.b;
    return *this;
  }
  LF& operator*=(const LF &o){
    a=a*o.a;
    b=b*o.a+o.b;
    return *this;
  }
  LF operator+(const LF &o)const{return LF(*this)+=o;}
  LF operator*(const LF &o)const{return LF(*this)*=o;}
  T operator()(T x) const{return a*x+b;}
};
//END CUT HERE
#ifndef call_from_test
//INSERT ABOVE HERE
signed main(){
  return 0;
}
#endif