<commit_before>#ifndef DRIVERS_LINEARCOORDMAP_H
#define DRIVERS_LINEARCOORDMAP_H

/* 
 * Printipi/drivers/linearcoordmap.h
 * (c) 2014 <NAME>
 *
 * LinearCoordMap implements the CoordMap interface for Cartesian robots.
 * This is the CoordMap that your driver (src/drivers/driver.h implementation) should use if it is a Cartesian robot.
 */

#include "coordmap.h"
#include "common/matrix.h"

namespace drv {

template <typename Transform=matr::Identity3Static> class LinearCoordMap : public CoordMap {
	static constexpr std::size_t xIdx = 0;
	static constexpr std::size_t yIdx = 1;
	static constexpr std::size_t zIdx = 2;
	static constexpr std::size_t eIdx = 3;
	//Transform transform;
	public:
		static constexpr std::size_t numAxis() {
            return 4; //A, B, C + Extruder
        }
		static constexpr std::array<int, 4> getHomePosition(const std::array<int, 4> &cur) {
			return std::array<int, 4>({0, 0, 0, cur[3]});
		}
		static std::tuple<float, float, float> applyLeveling(const std::tuple<float, float, float> &xyz) {
			return Transform::transform(xyz);
		}
		static void xyzeFromMechanical(const std::array<int, 4> &mech) {
			return std::make_tuple(mech[xIdx], mech[yIdx], mech[zIdx], mech[eIdx]);
		}

};

}

#endif<commit_msg>Fixed return type of xyzeFromMechanical<commit_after>#ifndef DRIVERS_LINEARCOORDMAP_H
#define DRIVERS_LINEARCOORDMAP_H

/* 
 * Printipi/drivers/linearcoordmap.h
 * (c) 2014 <NAME>
 *
 * LinearCoordMap implements the CoordMap interface for Cartesian robots.
 * This is the CoordMap that your driver (src/drivers/driver.h implementation) should use if it is a Cartesian robot.
 */

#include "coordmap.h"
#include "common/matrix.h"

namespace drv {

template <typename Transform=matr::Identity3Static> class LinearCoordMap : public CoordMap {
	static constexpr std::size_t xIdx = 0;
	static constexpr std::size_t yIdx = 1;
	static constexpr std::size_t zIdx = 2;
	static constexpr std::size_t eIdx = 3;
	//Transform transform;
	public:
		static constexpr std::size_t numAxis() {
            return 4; //A, B, C + Extruder
        }
		static constexpr std::array<int, 4> getHomePosition(const std::array<int, 4> &cur) {
			return std::array<int, 4>({0, 0, 0, cur[3]});
		}
		static std::tuple<float, float, float> applyLeveling(const std::tuple<float, float, float> &xyz) {
			return Transform::transform(xyz);
		}
		static std::tuple<float, float, float, float> bound(const std::tuple<float, float, float, float> &xyze) {
			return xyze; //no bounding.
		}
		static std::tuple<float, float, float, float> xyzeFromMechanical(const std::array<int, 4> &mech) {
			return std::make_tuple(mech[xIdx], mech[yIdx], mech[zIdx], mech[eIdx]);
		}

};

}

#endif
{'fraction_non_alphanumeric': 0.1292239138507241, 'fraction_numerical': 0.013367991088005942, 'mean_word_length': 4.671578947368421, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5819682', 'n_tokens_mistral': 1026, 'n_tokens_neox': 923, 'n_words': 253}