Skip to content

Commit b01f375

Browse files
committed
Remove unused functions
1 parent 37628ec commit b01f375

1 file changed

Lines changed: 0 additions & 100 deletions

File tree

src/std.jl

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -294,65 +294,6 @@ function _to_std_string(arg::BinaryOperation{Op}) where {Op<:AdditiveOperation}
294294
_to_std_string(arg.arg2)
295295
end
296296

297-
function add_contracting_factor_ordered!(ordered_factors::AbstractArray, factor::Tensor)
298-
for fixed (first(ordered_factors), last(ordered_factors))
299-
fixed_indices = get_free_indices(fixed)
300-
next_indices = get_free_indices(factor)
301-
302-
### Contractions
303-
################
304-
if typeof(last(next_indices)) == Lower &&
305-
flip(last(next_indices)) == first(fixed_indices)
306-
pushfirst!(ordered_factors, factor)
307-
return true
308-
end
309-
310-
if typeof(last(next_indices)) == Upper &&
311-
flip(last(next_indices)) == first(fixed_indices)
312-
push!(ordered_factors, factor)
313-
return true
314-
end
315-
316-
if typeof(first(next_indices)) == Upper &&
317-
flip(first(next_indices)) == last(fixed_indices)
318-
push!(ordered_factors, factor)
319-
return true
320-
end
321-
322-
if typeof(first(next_indices)) == Lower &&
323-
flip(first(next_indices)) == last(fixed_indices)
324-
pushfirst!(ordered_factors, factor)
325-
return true
326-
end
327-
328-
if typeof(last(next_indices)) == Upper &&
329-
flip(last(next_indices)) == last(fixed_indices)
330-
push!(ordered_factors, factor)
331-
return true
332-
end
333-
334-
if typeof(last(next_indices)) == Lower &&
335-
flip(last(next_indices)) == last(fixed_indices)
336-
pushfirst!(ordered_factors, factor)
337-
return true
338-
end
339-
340-
if typeof(first(next_indices)) == Upper &&
341-
flip(first(next_indices)) == first(fixed_indices)
342-
push!(ordered_factors, factor)
343-
return true
344-
end
345-
346-
if typeof(first(next_indices)) == Lower &&
347-
flip(first(next_indices)) == first(fixed_indices)
348-
pushfirst!(ordered_factors, factor)
349-
return true
350-
end
351-
end
352-
353-
return false
354-
end
355-
356297
function get_contra_covariant_matrix(arg1::Tensor, arg2::Tensor)
357298
arg1_ids, arg2_ids = get_free_indices.((arg1, arg2))
358299
arg1_letters = [i.letter for i get_free_indices(arg1)]
@@ -679,47 +620,6 @@ function to_binary_operation(op::Op, term) where {Op}
679620
return term
680621
end
681622

682-
function group_factors(factors::AbstractArray)
683-
indices = unique(vcat(get_free_indices.(factors)...))
684-
685-
chunked_factors = []
686-
remaining = Any[f for f factors]
687-
688-
# Find factors that contain the same index
689-
for index indices
690-
complex = []
691-
692-
if all(isnothing.(remaining))
693-
break
694-
end
695-
696-
for i eachindex(remaining)
697-
if isnothing(remaining[i])
698-
continue
699-
end
700-
if has_index(remaining[i], index)
701-
push!(complex, i)
702-
end
703-
end
704-
705-
if isempty(complex) || length(complex) == 1
706-
continue
707-
end
708-
709-
push!(chunked_factors, remaining[complex])
710-
remaining[complex] .= nothing
711-
end
712-
713-
for i eachindex(remaining)
714-
if !isnothing(remaining[i])
715-
push!(chunked_factors, remaining[i])
716-
remaining[i] = nothing
717-
end
718-
end
719-
720-
return chunked_factors
721-
end
722-
723623
# Recursive adjoint
724624
function radjoint(arg::T) where {T<:UnaryOperation}
725625
return T(arg.arg')

0 commit comments

Comments
 (0)