*** empty log message ***
This commit is contained in:
		
							parent
							
								
									7ddf566aa1
								
							
						
					
					
						commit
						225efeab4a
					
				
							
								
								
									
										13
									
								
								mat.h
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								mat.h
									
									
									
									
									
								
							@ -44,9 +44,9 @@ public:
 | 
				
			|||||||
	inline NRMat(const NRMat &rhs);
 | 
						inline NRMat(const NRMat &rhs);
 | 
				
			||||||
	explicit NRMat(const NRSMat<T> &rhs);
 | 
						explicit NRMat(const NRSMat<T> &rhs);
 | 
				
			||||||
#ifdef MATPTR
 | 
					#ifdef MATPTR
 | 
				
			||||||
	explicit NRMat(const NRVec<T> &rhs, const int n, const int m) :NRMat(&rhs[0][0],n,m) {};
 | 
						explicit NRMat(const NRVec<T> &rhs, const int n, const int m, const int offset=0) :NRMat(&rhs[0][0] + offset ,n,m) {if (offset < 0 || n*m + offset > rhs.nn) laerror("matrix dimensions and offset incompatible with vector length");};
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
	explicit NRMat(const NRVec<T> &rhs, const int n, const int m);
 | 
						explicit NRMat(const NRVec<T> &rhs, const int n, const int m, const int offset=0);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	~NRMat();
 | 
						~NRMat();
 | 
				
			||||||
#ifdef MATPTR
 | 
					#ifdef MATPTR
 | 
				
			||||||
@ -227,15 +227,14 @@ NRMat<T>::NRMat(const NRSMat<T> &rhs)
 | 
				
			|||||||
 
 | 
					 
 | 
				
			||||||
#ifndef MATPTR
 | 
					#ifndef MATPTR
 | 
				
			||||||
template <typename T>
 | 
					template <typename T>
 | 
				
			||||||
NRMat<T>::NRMat(const NRVec<T> &rhs, const int n, const int m)
 | 
					NRMat<T>::NRMat(const NRVec<T> &rhs, const int n, const int m, const int offset)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
#ifdef DEBUG
 | 
						if (offset < 0 || n*m + offset > rhs.nn) laerror("matrix dimensions and offset incompatible with vector length");
 | 
				
			||||||
	if (n*m != rhs.nn) laerror("matrix dimensions incompatible with vector length");
 | 
					
 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
	nn = n;
 | 
						nn = n;
 | 
				
			||||||
	mm = m;
 | 
						mm = m;
 | 
				
			||||||
	count = rhs.count;
 | 
						count = rhs.count;
 | 
				
			||||||
	v = rhs.v;
 | 
						v = rhs.v + offset;
 | 
				
			||||||
	(*count)++;
 | 
						(*count)++;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user