changeset 465:f270d82fc9ad feature/inflated_tensormapping

Change documention in an attempt to follow the guidelines
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 22 Oct 2020 10:46:23 +0200
parents 73882867c121
children 6458c929de4a
files src/LazyTensors/lazy_tensor_operations.jl
diffstat 1 files changed, 5 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl	Thu Oct 22 10:27:29 2020 +0200
+++ b/src/LazyTensors/lazy_tensor_operations.jl	Thu Oct 22 10:46:23 2020 +0200
@@ -197,31 +197,17 @@
 export InflatedTensorMapping
 """
     InflatedTensorMapping(before, tm, after)
+    InflatedTensorMapping(before,tm)
+    InflatedTensorMapping(tm,after)
 
 The outer product of `before`, `tm` and `after`, where `before` and `after` are `IdentityMapping`s.
+
+If one of `before` or `after` is left out, a 0-dimensional `IdentityMapping` is used as the default value.
 """
 InflatedTensorMapping(::IdentityMapping, ::TensorMapping, ::IdentityMapping)
-
-"""
-    InflatedTensorMapping(before,tm)
-
-The outer product of `before`, `tm` and `after`, where `before` and `after` are `IdentityMapping`s and `after` is empty.
-"""
 InflatedTensorMapping(before::IdentityMapping, tm::TensorMapping{T}) where T = InflatedTensorMapping(before,tm,IdentityMapping{T}())
-
-"""
-    InflatedTensorMapping(tm,after)
-
-The outer product of `before`, `tm` and `after`, where `before` and `after` are `IdentityMapping`s and `before` is empty.
-"""
 InflatedTensorMapping(tm::TensorMapping{T}, after::IdentityMapping) where T = InflatedTensorMapping(IdentityMapping{T}(),tm,after)
-
-"""
-    InflatedTensorMapping(I1,I2)
-
-Specialized constructor for InflatedTensorMapping where `I1`,`I2` are IdentityMappings (required to resolve ambiguities).
-Calls InflatedTensorMapping(before, tm)
-"""
+# Resolve ambiguity between the two previous methods
 InflatedTensorMapping(I1::IdentityMapping{T}, I2::IdentityMapping{T}) where T = InflatedTensorMapping(I1,I2,IdentityMapping{T}())
 
 # TODO: Implement syntax and constructors for products of different combinations of InflatedTensorMapping and IdentityMapping