10 lines
181 B
Ruby
10 lines
181 B
Ruby
module Math
|
|
|
|
# Kronecker symbol of +i+ and +j+.
|
|
# Returns 1 if +i+ and +j+ are equal, 0 otherwise.
|
|
def self.delta(i, j)
|
|
return Integer(i) == Integer(j) ? 1 : 0
|
|
end
|
|
|
|
end
|