#ifndef __REVERSE_VALARRAY_2006_07_31__ #define __REVERSE_VALARRAY_2006_07_31__ /** @file ValReversi.hpp @author Brian Magill @creationdate 7/31/2006 @copyright (©) Copyright 2006 by GATS, Inc., 11864 Canon Blvd, Suite 101, Newport News VA 23606 All Rights Reserved. No part of this software or publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise without the prior written permission of GATS, Inc. @brief reverses the order of elements in a valarray */ #include template std::valarray ValReversi(std::valarray const & A) { std::valarray temp(A.size() ); for(unsigned long i = 0; i < A.size(); i++) { temp[i] = A[A.size() - 1 - i]; } return temp; }; #endif