Scientific Computing with Scala

Packt Publishing Limited
  • 1. Auflage
  • |
  • erschienen am 27. April 2016
  • |
  • 232 Seiten
E-Book | ePUB mit Adobe DRM | Systemvoraussetzungen
978-1-78588-747-5 (ISBN)
Learn to solve scientific computing problems using Scala and its numerical computing, data processing, concurrency, and plotting librariesAbout This BookParallelize your numerical computing code using convenient and safe techniques.Accomplish common high-performance, scientific computing goals in Scala.Learn about data visualization and how to create high-quality scientific plots in ScalaWho This Book Is ForScientists and engineers who would like to use Scala for their scientific and numerical computing needs. A basic familiarity with undergraduate level mathematics and statistics is expected but not strictly required. A basic knowledge of Scala is required as well as the ability to write simple Scala programs. However, complicated programming concepts are not used in the book. Anyone who wants to explore using Scala for writing scientific or engineering software will benefit from the book.What You Will LearnWrite and read a variety of popular file formats used to store scientific dataUse Breeze for linear algebra, optimization, and digital signal processingGain insight into Saddle for data analysisUse ScalaLab for interactive computingQuickly and conveniently write safe parallel applications using Scala's parallel collectionsImplement and deploy concurrent programs using the Akka frameworkUse the Wisp plotting library to produce scientific plotsVisualize multivariate data using various visualization techniquesIn DetailScala is a statically typed, Java Virtual Machine (JVM)-based language with strong support for functional programming. There exist libraries for Scala that cover a range of common scientific computing tasks - from linear algebra and numerical algorithms to convenient and safe parallelization to powerful plotting facilities. Learning to use these to perform common scientific tasks will allow you to write programs that are both fast and easy to write and maintain.We will start by discussing the advantages of using Scala over other scientific computing platforms. You will discover Scala packages that provide the functionality you have come to expect when writing scientific software. We will explore using Scala's Breeze library for linear algebra, optimization, and signal processing. We will then proceed to the Saddle library for data analysis. If you have experience in R or with Python's popular pandas library you will learn how to translate those skills to Saddle. If you are new to data analysis, you will learn basic concepts of Saddle as well. Well will explore the numerical computing environment called ScalaLab. It comes bundled with a lot of scientific software readily available. We will use it for interactive computing, data analysis, and visualization. In the following chapters, we will explore using Scala's powerful parallel collections for safe and convenient parallel programming. Topics such as the Akka concurrency framework will be covered. Finally, you will learn about multivariate data visualization and how to produce professional-looking plots in Scala easily. After reading the book, you should have more than enough information on how to start using Scala as your scientific computing platformStyle and approachExamples are provided on how to use Scala to do basic numerical and scientific computing tasks. All the concepts are illustrated with more involved examples in each chapter. The goal of the book is to allow you to translate existing experience in scientific computing to Scala.
  • Englisch
  • Birmingham
  • |
  • Großbritannien
978-1-78588-747-5 (9781785887475)
1785887475 (1785887475)
weitere Ausgaben werden ermittelt
Vytautas Jancauskas is a computer science PhD student and lecturer at Vilnius University. At the time of writing, he was about to get a PhD in computer science. The thesis concerns multiobjective optimization using nature-inspired optimization methods. Throughout the years, he has worked on a number of open source projects that have to do with scientific computing. These include Octave, pandas, and others. Currently, he is working with numerical codes with astrophysical applications.
He has experience writing code to be run on supercomputers, optimizing code for performance, and interfacing C code to higher-level languages. He has been teaching computer networks, operating systems design, C programming, and computer architecture to computer science and software engineering undergraduates at Vilnius University for 4 years now.
His primary research interests include optimization, numerical algorithms, programming language design, and software engineering. Vytautas has significant experience with various different programming languages. He has written simple programs and has participated in projects using Scheme, Common Lisp, Python, C/C++, and Scala. He has experience working as a Unix systems administrator. He also has significant experience working with numerical computing platforms such as NumPy/MATLAB and data analysis frameworks such pandas and R.
  • Cover
  • Copyright
  • Credits
  • About the Author
  • About the Reviewer
  • Table of Contents
  • Preface
  • Chapter 1: Introducing Scientific Computing with Scala
  • Why Scala for scientific computing?
  • What are the advantages compared to C/C++/Java?
  • What are the advantages compared to MATLAB/Python/R?
  • Scala does parallelism well
  • Any downsides?
  • Numerical computing packages for Scala
  • Scalala
  • Breeze
  • ScalaLab
  • Data analysis packages for Scala
  • Saddle
  • MLlib
  • Other scientific software
  • Cassovary
  • Figaro
  • Alternatives for doing plotting
  • Using Emacs as the Scala IDE
  • Profiling Scala code
  • Debugging Scala code
  • Building, testing, and distributing your Scala software
  • Directory structure
  • Testing Scala code with the help of SBT
  • ENSIME and SBT integration
  • Distributing your software
  • Mixing Java and Scala code
  • Summary
  • Chapter 2: Storing and Retrieving Data
  • Reading and writing CSV files
  • Reading files in Scala
  • Parsing CSV data
  • Processing CSV data
  • Reading and writing JSON files
  • Spray-JSON
  • SON of JSON
  • Argonaut
  • Reading and writing XML files
  • Database access using JDBC
  • Database access using Slick
  • Plain SQL
  • Reading and writing HDF5 files
  • Summary
  • Chapter 3: Numerical Computing with Breeze
  • Using Breeze in your project
  • Basic Breeze data structures
  • DenseVector
  • DenseMatrix
  • Indexing and slicing
  • Reshaping
  • Concatenation
  • Statistical computing with Breeze
  • Optimization
  • Signal processing
  • Fourier transforms
  • Other signal processing functionality
  • Cheat sheet
  • Creating matrices and vectors
  • Operations on matrices and vectors
  • Summary
  • Chapter 4: Using Saddle for Data Analysis
  • Installing Saddle
  • Basic Saddle data structures
  • Using the Vec structure
  • Using arithmetic operations in Vec
  • Data access in Vec
  • Implementing the slice method in Vec
  • Statistic calculation in Vec
  • Using the Mat structure
  • Creating a matrix with Mat
  • Applying arithmetic operators in Mat structures
  • Using Matrix in the Mat structure
  • Series
  • Implementing the groupBy method in the Series structure
  • Applying the transform method in Series
  • Using numerical operators in Series
  • Joining Series using the join operation
  • Frame
  • Using the rowAt method in Frame
  • Using the sortedColsBy method in Frame
  • Data analysis with Saddle
  • Using Breeze with Saddle
  • Summary
  • Chapter 5: Interactive Computing with ScalaLab
  • Installing and running ScalaLab
  • Basic ScalaSci data structures
  • Vector
  • Matrix
  • Other ScalaSci functionality
  • Data storage and retrieval
  • Plotting with ScalaLab
  • Other ScalaLab features
  • Doing symbolic algebra using symja
  • Summary
  • Chapter 6: Parallel Programming in Scala
  • Programming with Scala threads
  • A simple Scala thread example
  • Synchronization
  • Monte-Carlo pi calculation
  • Using Scala's parallel collections
  • Agent-based concurrency with the Akka framework
  • Monte-Carlo pi revisited
  • Using routing
  • Waiting for a reply
  • Summary
  • Chapter 7: Cluster Computing Using Scala
  • Using MPJ Express for distributed computing
  • Setting up and running MPJ Express
  • Using Send and Recv
  • Sending Scala objects in MPJ Express messages
  • Non-blocking communication
  • Scatter and Gather
  • Setting up MPJ Express on clusters
  • Using an Akka cluster for distributed computing
  • Summary
  • Chapter 8: Scientific Plotting with Scala
  • Plotting with JFreeChart
  • Using JFreeChart in your project
  • Creating a line plot
  • Creating a histogram
  • Creating a bar chart
  • Creating a box-and-whisker chart
  • Other plot types
  • Saving charts to a file
  • Plotting with scala-chart
  • Installing scala-chart
  • Creating a line plot
  • Creating a histogram
  • Creating a bar chart
  • Creating a box-and-whisker chart
  • Saving charts to a file
  • Plotting with Wisp
  • Creating a line plot
  • Creating a histogram
  • Creating a bar chart
  • Creating a box-and-whisker chart
  • Creating a linear regression plot
  • Interacting with the server
  • Summary
  • Chapter 9: Visualizing Multi-Dimensional Data in Scala
  • Obtaining data to visualize
  • Andrews curve
  • Parallel coordinates
  • Scatter plot matrix
  • Sammon mapping
  • Improving the program
  • Summary
  • Index

Dateiformat: EPUB
Kopierschutz: Adobe-DRM (Digital Rights Management)


Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat EPUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Weitere Informationen finden Sie in unserer E-Book Hilfe.

Download (sofort verfügbar)

35,85 €
inkl. 19% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe DRM
siehe Systemvoraussetzungen
E-Book bestellen

Unsere Web-Seiten verwenden Cookies. Mit der Nutzung dieser Web-Seiten erklären Sie sich damit einverstanden. Mehr Informationen finden Sie in unserem Datenschutzhinweis. Ok