/[escript]/trunk/escript/src/DataExpanded.cpp
ViewVC logotype

Diff of /trunk/escript/src/DataExpanded.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3389 by caltinay, Thu Oct 28 00:50:41 2010 UTC revision 3390 by jfenwick, Thu Dec 2 00:34:37 2010 UTC
# Line 816  DataExpanded::getVectorRO() const Line 816  DataExpanded::getVectorRO() const
816      return m_data.getData();      return m_data.getData();
817  }  }
818    
819    void DataExpanded::randomFill(double seed)
820    {
821        CHECK_FOR_EX_WRITE
822        if (seed==0)
823        {
824        time_t s=time(0);
825        seed=s;
826        }
827        srand(seed);
828        DataVector&  dv=getVectorRW();
829        for (long i=0;i<dv.size();++i)
830        {
831        dv[i]=(double)rand()/RAND_MAX;
832        }
833    }
834    
835  }  // end of namespace  }  // end of namespace

Legend:
Removed from v.3389  
changed lines
  Added in v.3390

  ViewVC Help
Powered by ViewVC 1.1.26