Subversion Repositories gelsvn

Rev

Rev 578 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 578 Rev 585
Line 404... Line 404...
404
    inline std::istream& operator>>(std::istream&is, ArithVec<T,V,N>& v)
404
    inline std::istream& operator>>(std::istream&is, ArithVec<T,V,N>& v)
405
    {
405
    {
406
        is >> std::ws;
406
        is >> std::ws;
407
        if (is.peek() == '[')
407
        if (is.peek() == '[')
408
            is.ignore();
408
            is.ignore();
409
//        else
-
 
410
//        {
-
 
411
//            is.setstate(std::ios::badbit);
-
 
412
//            return is;
-
 
413
//        }
-
 
414
        is >> std::ws;
409
        is >> std::ws;
415
        for (int c=0; c<N; ++c)
410
        for (int c=0; c<N; ++c)
416
        {
411
        {
417
            is >> v(c) >> std::ws;
412
            is >> v(c) >> std::ws;
418
        }
413
        }
419
        if (is.peek() == ']')
414
        if (is.peek() == ']')
420
            is.ignore();
415
            is.ignore();
421
//        else
-
 
422
//        {
-
 
423
//            is.setstate(std::ios::badbit);
-
 
424
//            return is;
-
 
425
//        }
-
 
426
        return is;
416
        return is;
427
 
-
 
428
        //OLD VERSION
-
 
429
        //for(unsigned int i=0;i<N;i++) is>>v[i];
-
 
430
        //    return is;
-
 
431
    }
417
    }
432
 
418
 
433
 
419
 
434
  /** Dot product for two vectors. The `*' operator is 
420
  /** Dot product for two vectors. The `*' operator is 
435
      reserved for coordinatewise	multiplication of vectors. */
421
      reserved for coordinatewise	multiplication of vectors. */