⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 slog_profile.java

📁 MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程环境.
💻 JAVA
字号:
import java.io.*;import java.util.*;public class SLOG_Profile implements Serializable{    private Vector    entries;  // Vector of SLOG_ProfileEntry    public SLOG_Profile()    {        entries  = new Vector( 0 );    }    public Enumeration GetEnumerationOfEntries()    {        return entries.elements();    }    public SLOG_Profile( RandomAccessFile file_stm )    throws IOException, NoSuchElementException    {        entries  = new Vector();        this.ReadFromRandomFile( file_stm );    }    public SLOG_Profile( RandomAccessFile file_stm, long fileloc )    throws IOException, NoSuchElementException    {        file_stm.seek( fileloc );        entries  = new Vector();        this.ReadFromRandomFile( file_stm );    }    public void ReadFromRandomFile( RandomAccessFile file_stm )    throws IOException, NoSuchElementException    {        int Nbytes_read = 0;        int Nentries    = file_stm.readInt(); // No. of entries in SLOG_Profile        for ( int ii = 0; ii < Nentries; ii++ ) {            String line = file_stm.readLine();            Nbytes_read += line.length() + 1;            if ( line.charAt( 0 ) != '#' ) {                SLOG_ProfileEntry entry = new SLOG_ProfileEntry( line );                entries.addElement( entry );                // System.out.println( entry );                entry = null;            }            line = null;        }    }    public String GetColor( final short in_intvltype )    {        SLOG_ProfileEntry entry;        Enumeration enum = entries.elements();        while ( enum.hasMoreElements() ) {            entry = ( SLOG_ProfileEntry ) enum.nextElement();            if ( entry.intvltype == in_intvltype )                return entry.color;        }        return null;    }    public String toString()    {        StringBuffer representation = new StringBuffer( "SLOG_Profile :\n" );        Enumeration enum = entries.elements();        while ( enum.hasMoreElements() )             representation.append( enum.nextElement() + "\n" );        return representation.toString();    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -