예제 #1
0
파일: inverse.py 프로젝트: EBRUDU1/triqs
def inverse(x):
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("inverse", inverse) (x)
    assert hasattr(x,'invert') and hasattr(x,'copy')
    cop = x.copy() 
    cop.invert()
    return cop
예제 #2
0
def inverse(x):
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("inverse", inverse)(x)
    assert hasattr(x, 'invert') and hasattr(x, 'copy')
    cop = x.copy()
    cop.invert()
    return cop
예제 #3
0
def inverse(x):
    if isinstance(x,(lazy_expressions.lazy_expr,lazy_expressions.lazy_expr_terminal)) : 
        return lazy_expressions.lazy_function("inverse", inverse) (x)
    assert hasattr(x,'invert') and hasattr(x,'copy')
    cop = x.copy() 
    cop.invert()
    return cop
예제 #4
0
def transpose(x):
    """
    Return the transpose of a Green's function
    """
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("transpose", transpose) (x)
    assert hasattr(x,'transpose')
    return x.transpose()
예제 #5
0
def conjugate(x):
    """
    Return the conjugate of a Green's function
    """
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("conjugate", conjugate) (x)
    assert hasattr(x,'conjugate')
    return x.conjugate()
예제 #6
0
def inverse(x):
    """
    Return the inverse of a Green's function
    """
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("inverse", inverse) (x)
    assert hasattr(x,'inverse')
    return x.inverse()
예제 #7
0
파일: inverse.py 프로젝트: xydeng/TRIQS
def inverse(x):
    if isinstance(
            x,
        (lazy_expressions.lazy_expr, lazy_expressions.lazy_expr_terminal)):
        return lazy_expressions.lazy_function("inverse", inverse)(x)
    assert hasattr(x, 'invert') and hasattr(x, 'copy')
    cop = x.copy()
    cop.invert()
    return cop
예제 #8
0
파일: tools.py 프로젝트: cyrilmartins/triqs
def inverse(x):
    """
    Compute the inverse of a Green's function and return this.
    """
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("inverse", inverse)(x)
    assert hasattr(x, "invert") and hasattr(x, "copy")
    cop = x.copy()
    cop.invert()
    return cop
예제 #9
0
def inverse(x):
    """
    Compute the inverse of a Green's function and return this.
    """
    if descriptors.is_lazy(x):
        return lazy_expressions.lazy_function("inverse", inverse)(x)
    assert hasattr(x, 'invert') and hasattr(x, 'copy')
    cop = x.copy()
    cop.invert()
    return cop