3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-25 05:43:40 +01:00

Fix #101 operator: add python wrapper for is_zero

- added is_zero in python
- reorder a bit (module defined first), but that is cosmetics
This commit is contained in:
Olivier Parcollet 2014-07-03 19:22:19 +02:00
parent 58659415ad
commit eeba763171

View File

@ -1,5 +1,12 @@
from wrap_generator import * from wrap_generator import *
# The many_body_operators module
module = module_(full_name = "pytriqs.operators.operators2", doc = "Doc to be written")
module.add_include("<triqs/operators/many_body_operator.hpp>")
module.add_include("<triqs/arrays.hpp>")
module.add_using("namespace triqs::utility")
# The operator class # The operator class
op = class_( op = class_(
py_type = "Operator", py_type = "Operator",
@ -10,12 +17,8 @@ op = class_(
) )
op.add_constructor(signature="()", doc="create zero operator") op.add_constructor(signature="()", doc="create zero operator")
op.add_method("bool is_zero()", doc = "Boolean : is the operator null ?")
# The many_body_operators module
module = module_(full_name = "pytriqs.operators.operators2", doc = "Doc to be written")
module.add_include("<triqs/operators/many_body_operator.hpp>")
module.add_include("<triqs/arrays.hpp>")
module.add_using("namespace triqs::utility")
module.add_class(op) module.add_class(op)
# Add various overload of c, c_dag to the module Annihilation & Creation operators # Add various overload of c, c_dag to the module Annihilation & Creation operators