Skip to content

Commit

Permalink
Adding basic documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanglw0521 committed Dec 18, 2024
1 parent 13e3539 commit 71d7699
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/O3_alternative.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function CG(l,m,L,N)
return C
end

# The variables of this function are fully inherited from the first ACE paper
function CG_new(l::SVector{N,Int64},m::SVector{N,Int64},L::SVector{N,Int64},M_N::Int64) where N
# @assert -L[N] ≤ M_N ≤ L[N]
if M_N sum(m) || L[1] < abs(m[1])
Expand All @@ -45,6 +46,7 @@ function CG_new(l::SVector{N,Int64},m::SVector{N,Int64},L::SVector{N,Int64},M_N:
return C
end

# Only when M_N = sum(m) can the CG coefficient be non-zero, so when missing M_N, we return the only one element that can possibly be non-zero
CG_new(l::SVector{N,Int64},m::SVector{N,Int64},L::SVector{N,Int64}) where N = CG_new(l,m,L,sum(m))

function SetLl0(l,N)
Expand Down Expand Up @@ -103,6 +105,7 @@ function SetLl(l,N,L)
return set
end

# Function that return a L set given an `l`. The elements of the set start with l[1] and end with L.
function SetLl_new(l::SVector{N,Int64}, L::Int64) where N
T = typeof(l)
if N==2
Expand Down

0 comments on commit 71d7699

Please sign in to comment.