working on fourindex conversions in tensor class
This commit is contained in:
		
							parent
							
								
									346ce5bc3a
								
							
						
					
					
						commit
						91d8f4cc46
					
				@ -1417,9 +1417,6 @@ else
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
template class Tensor<double>;
 | 
					template class Tensor<double>;
 | 
				
			||||||
template class Tensor<std::complex<double> >;
 | 
					template class Tensor<std::complex<double> >;
 | 
				
			||||||
template std::ostream & operator<<(std::ostream &s, const Tensor<double> &x);
 | 
					template std::ostream & operator<<(std::ostream &s, const Tensor<double> &x);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										22
									
								
								tensor.h
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								tensor.h
									
									
									
									
									
								
							@ -46,7 +46,7 @@
 | 
				
			|||||||
//@@@ will need to store vector of INDEX to the original tensor for the result's flatindex
 | 
					//@@@ will need to store vector of INDEX to the original tensor for the result's flatindex
 | 
				
			||||||
//@@@ will not be particularly efficient
 | 
					//@@@ will not be particularly efficient
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
//@@@conversions to/from fourindex, optional negarive range for beta spin handling
 | 
					//@@@conversions to/from fourindex, optional negative range for beta spin handling in some cases
 | 
				
			||||||
//@@@use the fact that fourindex_dense is inherited from Mat/SMat and construct tensor from the (unsymmetrized) NRMat sharing data, just rewrite then the shape
 | 
					//@@@use the fact that fourindex_dense is inherited from Mat/SMat and construct tensor from the (unsymmetrized) NRMat sharing data, just rewrite then the shape
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
//@@@?general permutation of individual indices - check the indices in sym groups remain adjacent, calculate result's shape, loopover the result and permute using unwind_callback
 | 
					//@@@?general permutation of individual indices - check the indices in sym groups remain adjacent, calculate result's shape, loopover the result and permute using unwind_callback
 | 
				
			||||||
@ -265,6 +265,26 @@ public:
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//due to template nesting and specialization limitation, this cannot be class member - the S parameter has to be the outer one
 | 
				
			||||||
 | 
					template<fourindexsymtype S, typename T, typename I> 
 | 
				
			||||||
 | 
					Tensor<T> fourindex2tensor(const fourindex_dense<S,T,I> &f);
 | 
				
			||||||
 | 
					template<fourindexsymtype S, typename T, typename I>          
 | 
				
			||||||
 | 
					void tensor2fourindex(const Tensor<T> &t, fourindex_dense<S,T,I> &f);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//conversions from/to fourindex specialized by symmetry type
 | 
				
			||||||
 | 
					template<typename T, typename I>
 | 
				
			||||||
 | 
					Tensor<T>  fourindex2tensor(const fourindex_dense<nosymmetry,T,I> &f)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					template<typename T, typename I>
 | 
				
			||||||
 | 
					void tensor2fourindex(const Tensor<T> &t, fourindex_dense<nosymmetry,T,I> &f)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
template <typename T>
 | 
					template <typename T>
 | 
				
			||||||
std::ostream & operator<<(std::ostream &s, const Tensor<T> &x);
 | 
					std::ostream & operator<<(std::ostream &s, const Tensor<T> &x);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user